Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Catch double click on MDI client CMDIFrameWndEx

Catch double click on MDI client CMDIFrameWndEx

Scheduled Pinned Locked Moved C / C++ / MFC
helpcomquestionlounge
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _Flaviu
    wrote on last edited by
    #1

    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.

    L V 2 Replies Last reply
    0
    • _ _Flaviu

      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.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The CMDIFrameWndEx class extends CMDIFrameWnd, so it should work exactly the same.

      _ 1 Reply Last reply
      0
      • L Lost User

        The CMDIFrameWndEx class extends CMDIFrameWnd, so it should work exactly the same.

        _ Offline
        _ Offline
        _Flaviu
        wrote on last edited by
        #3

        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[^]

        L 1 Reply Last reply
        0
        • _ _Flaviu

          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[^]

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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 of CMDIFrameWnd.

          _ 1 Reply Last reply
          0
          • L Lost User

            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 of CMDIFrameWnd.

            _ Offline
            _ Offline
            _Flaviu
            wrote on last edited by
            #5

            Applying old code, simply not working in this new case ... hmm ... I have to dig in ...

            1 Reply Last reply
            0
            • _ _Flaviu

              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.

              V Offline
              V Offline
              Victor Nijegorodov
              wrote on last edited by
              #6

              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)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups