How do I set the GDI HDC output area?

I want to paint HBITMAP on HDC,

I used StretchDIBits. It works fine. :: StretchDIBits.

however, I only need the window to see the drawing result, next to the window, I want the stretchDIBits to have no effect (it cannot draw on another area), how can I do that?

+1


source to share


1 answer


When creating a child window, make sure the style is WS_CLIPSIBLINGS

set to prevent drawing outside the client area in WM_PAINT

.



Also SelectClipRegion

, you probably want to.

+3


source







All Articles