> Why not pass the hDC of the PictureBox?
> To avoid possible Overdrawing of already painted
[quoted text clipped - 3 lines]
> RaiseEvent OwnerDrawnCell PicBox.hDC, x, y, dx, dy
> SelectClipRgn PicBox.hdc, 0
I'm not familiar with these two API calls, but if
IntersectClipRect defines a rectangle where the next
drawings are limited to take place (and SelectClipRgn sets
it back to the complete PicBox area), why should the region
described once more in the event parameters? I want exactly
to avoid this, else I could simply pass the PicBox itself
with x,y,dx,dy and trust that the calling app would be so
kind to draw only inside the rectangle.
newsreader - 02 Jun 2008 21:17 GMT
Try the links in: www.vb32.com
>> Why not pass the hDC of the PictureBox?
>> To avoid possible Overdrawing of already painted
[quoted text clipped - 11 lines]
> trust that the calling app would be so kind to draw only inside the
> rectangle.
Schmidt - 03 Jun 2008 03:57 GMT
> > Why not pass the hDC of the PictureBox?
> > To avoid possible Overdrawing of already painted
[quoted text clipped - 12 lines]
> with x,y,dx,dy and trust that the calling app would be so
> kind to draw only inside the rectangle.
Hmm, maybe you are after SetViewPortOrg then,
if you want to let the client-app draw with relative
cell-coords.
But setting such an overdraw-limitation, (which clips
any drawn user-content to the current cell) is not a
bad "protection"-idea - since the user could use *any*
GDI-Call, even if the call itself does *not* support
separate clipping-rects in its params as e.g. ExtTextOut.
Your choice.
Olaf