Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
delu qiu
|
Sep 20, 2006 - 3:06 PM
|
Hi,
I disabled the system button on the titlebar of my frame window. but the window minimized when doubleclick its titlebar. How can I disable the doubleclick event?
Thanks. This is my code: class CMainFrame : public CExtNCW < CMDIFrameWnd > { .. }
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( ! CExtNCW < CMDIFrameWnd > :: PreCreateWindow( cs ) ) return FALSE;
cs.lpszClass = AfxRegisterWndClass(0); if(cs.hMenu!=NULL) { ::DestroyMenu(cs.hMenu); // delete menu if loaded cs.hMenu = NULL; // no menu for this window
} cs.style &= ~WS_MAXIMIZEBOX ;// this makes it not have maximize button cs.style &= ~WS_SYSMENU ;// this makes it not have maximize button
cs.style &= ~WS_THICKFRAME;// this makes it not resizeable
return CFrameWnd::PreCreateWindow(cs); }
|
|
Technical Support
|
Sep 21, 2006 - 6:02 AM
|
If you want to prevent the caption double click event on the current version of the skinable frame window, then you should override the WindowProc() method and handle the WM_NCLBUTTONDBLCLK standard Windows message. Your method should not invoke the parent class method for this message.
|
|