Bug? in View>>wmPrintClient:wParam:lParam:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug? in View>>wmPrintClient:wParam:lParam:

Chris Uppal-3
Not sure if this is a bug in D6, or my own code assuming too much, but I'm
getting walkbacks porting some stuff to D6.

The problem is the new View>>wmPrintClient:wParam:lParam: method, which sends
#onPaintRequired: to my View class's instance with a PaintEvent that does not
contain a valid (non-nil) "paintStruct".  That breaks my code since I make use
of the PAINTSTRUCT to determine what to paint.

I can hack in a temporary fix/workaround, but what /should/ I do here please ?

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Bug? in View>>wmPrintClient:wParam:lParam:

Blair McGlashan-4
"Chris Uppal" <[hidden email]> wrote in message
news:441803a0$1$1173$[hidden email]...

> Not sure if this is a bug in D6, or my own code assuming too much, but I'm
> getting walkbacks porting some stuff to D6.
>
> The problem is the new View>>wmPrintClient:wParam:lParam: method, which
> sends
> #onPaintRequired: to my View class's instance with a PaintEvent that does
> not
> contain a valid (non-nil) "paintStruct".  That breaks my code since I make
> use
> of the PAINTSTRUCT to determine what to paint.
>
> I can hack in a temporary fix/workaround, but what /should/ I do here
> please ?
>

Bit of a cheeky change in spec. I'm afraid. You should allow for the
paintStruct being nil and paint the entire client area.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Bug? in View>>wmPrintClient:wParam:lParam:

Chris Uppal-3
Blair,

> Bit of a cheeky change in spec. I'm afraid. You should allow for the
> paintStruct being nil and paint the entire client area.

Okey doke.  But what is the #clientExtent when the code is invoked to generate
a thumbnail for the resource pane in a CHB ?   Can I just assume that the
framework will have set everything up correctly for that case ?

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Bug? in View>>wmPrintClient:wParam:lParam:

Blair McGlashan-4
"Chris Uppal" <[hidden email]> wrote in message
news:44192f97$0$1170$[hidden email]...
> Blair,
>
>> Bit of a cheeky change in spec. I'm afraid. You should allow for the
>> paintStruct being nil and paint the entire client area.
>
> Okey doke.  But what is the #clientExtent when the code is invoked to
> generate
> a thumbnail for the resource pane in a CHB ?   Can I just assume that the
> framework will have set everything up correctly for that case ?

Yes. Draw the client area at its current extent (which will be the extent
saved down by the view composer into the resource). Scaling is done by the
image presenter displaying the bitmap that results.

Regards

Blair