Catch double click on MDI client CMDIFrameWndEx
-
Hi all of you. Is there a way to catch double-click event on an MDI client area, but when CMainFrame are derived from CMDIFrameWndEx, not from CMDIFrameWnd ? I have solved this problem in the past (Catch double-click in CMainFrame[^]), when CMainFrame was derived from CMDIFrameWnd, but that trick doesn't work now ... Can you give me a little help to solve this issue ? Thank you.
-
Hi all of you. Is there a way to catch double-click event on an MDI client area, but when CMainFrame are derived from CMDIFrameWndEx, not from CMDIFrameWnd ? I have solved this problem in the past (Catch double-click in CMainFrame[^]), when CMainFrame was derived from CMDIFrameWnd, but that trick doesn't work now ... Can you give me a little help to solve this issue ? Thank you.
-
I have applied the same technique:
if(! m\_wndMDIClient.SubclassWindow(m\_hWndMDIClient)) { TRACE0(\_T("Failed to create the MDI client window\\n")); return -1; }
but get me ASSERT error:
wincode.cpp
, line 330, but at "Retry" the IDE led me here:extern "C" int WINAPI
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
_In_ LPTSTR lpCmdLine, int nCmdShow)
#pragma warning(suppress: 4985)
{
// call shared/exported WinMain
return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
}I don't think it is so simple now, with new
CMDIFrameWndEx
... I nthe meantime, I have found this: Debug Assertion Failed While Subclassing MDIClient Window VC++ 2008[^] -
I have applied the same technique:
if(! m\_wndMDIClient.SubclassWindow(m\_hWndMDIClient)) { TRACE0(\_T("Failed to create the MDI client window\\n")); return -1; }
but get me ASSERT error:
wincode.cpp
, line 330, but at "Retry" the IDE led me here:extern "C" int WINAPI
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
_In_ LPTSTR lpCmdLine, int nCmdShow)
#pragma warning(suppress: 4985)
{
// call shared/exported WinMain
return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
}I don't think it is so simple now, with new
CMDIFrameWndEx
... I nthe meantime, I have found this: Debug Assertion Failed While Subclassing MDIClient Window VC++ 2008[^]I don't see that that has anything to do with your original question. And since you are subclassing the Window, it may well be that you are doing something wrong. If you go and look at the MSDN documentation you will see that the
CMDIFrameWndEx
does not block any of the methods ofCMDIFrameWnd
. -
I don't see that that has anything to do with your original question. And since you are subclassing the Window, it may well be that you are doing something wrong. If you go and look at the MSDN documentation you will see that the
CMDIFrameWndEx
does not block any of the methods ofCMDIFrameWnd
. -
Hi all of you. Is there a way to catch double-click event on an MDI client area, but when CMainFrame are derived from CMDIFrameWndEx, not from CMDIFrameWnd ? I have solved this problem in the past (Catch double-click in CMainFrame[^]), when CMainFrame was derived from CMDIFrameWnd, but that trick doesn't work now ... Can you give me a little help to solve this issue ? Thank you.
Please, see my reply to the same question in CG forum: [Handle WM_LBUTTONDBLCLK on CMainFrame](http://forums.codeguru.com/showthread.php?558843-Handle-WM\_LBUTTONDBLCLK-on-CMainFrame&p=2211363#post2211363)