Re: Owner draw main windows, will left some drawing on the background of the window, I want the reason and how to prevent this happen?
I haven't seen SetWindowRgn being used on an overlapped window (one
containing the caption bar with the minimize, maximize, close buttons)
before. Windows normally draws that non-client area. Are you running on
Aero? I've seen people report issues that they can no longer custom paint
the non-client area on Aero, maybe this is related to trying to use
SetWindowRgn to limit the painting of it. I have only seen SetWindowRgn
used successfully with WS_POPUP windows which don't have the caption bar.
-- David
"green" <greenabc300@hotmail.com> wrote in message
news:uvUQRO5gKHA.3888@TK2MSFTNGP02.phx.gbl...
I used HDC hWindowDC = GetWindowDC();
Draw the non client area on hWindowDC
in class of WTL:
class CMainFrame : public CFrameWindowImpl<CMainFrame>, public
CUpdateUI<CMainFrame>,
public CMessageFilter, public CIdleHandler
---------------------------------------------------------------------------------------------
"green" <greenabc300@hotmail.com>
????????????:e4v77F5gKHA.3792@TK2MSFTNGP02.phx.gbl...
Hello, every one!
Ownerdraw main window , I used SetWindowRgn to cut down the four corners,
but there will left something drawing here when you drag the corners and
borders to resized the window on the background of the main window. Only
3 corners of the four corners do this.
Thanks a lot!