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. non-user interface event such as a DDE, OLE

non-user interface event such as a DDE, OLE

Scheduled Pinned Locked Moved C / C++ / MFC
comvisual-studiodesigndebuggingtutorial
3 Posts 2 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

    I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.

    void CMainFrame::ActivateFrame(int nCmdShow)
    {
    // TODO: Add your specialized code here and/or call the base class
    MessageBox(_T("AAAA"));
    CMDIFrameWnd::ActivateFrame(nCmdShow);
    }

    And I have read CFrameWnd::ActivateFrame [^]here that this method are called "Call this member function to activate and restore the frame window so that it is visible and available to the user. This member function is usually called after a non-user interface event such as a DDE, OLE, or other event that may show the frame window or its contents to the user." Can you give an example when this method is called ? I am trying to start the my app in hidden mode, passing in this method (CMainFrame::ActivateFrame) nCmdShow = SW_HIDE; Thank you.

    V 1 Reply Last reply
    0
    • _ _Flaviu

      I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.

      void CMainFrame::ActivateFrame(int nCmdShow)
      {
      // TODO: Add your specialized code here and/or call the base class
      MessageBox(_T("AAAA"));
      CMDIFrameWnd::ActivateFrame(nCmdShow);
      }

      And I have read CFrameWnd::ActivateFrame [^]here that this method are called "Call this member function to activate and restore the frame window so that it is visible and available to the user. This member function is usually called after a non-user interface event such as a DDE, OLE, or other event that may show the frame window or its contents to the user." Can you give an example when this method is called ? I am trying to start the my app in hidden mode, passing in this method (CMainFrame::ActivateFrame) nCmdShow = SW_HIDE; Thank you.

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

      Flaviu2 wrote:

      I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.

      void CMainFrame::ActivateFrame(int nCmdShow)
      {
      // TODO: Add your specialized code here and/or call the base class
      MessageBox(_T("AAAA"));
      CMDIFrameWnd::ActivateFrame(nCmdShow);
      }

      Did you try to replace MessageBox call with a TRACE and check whether your text is displayed in the Output window?

      _ 1 Reply Last reply
      0
      • V Victor Nijegorodov

        Flaviu2 wrote:

        I have noticed that CMainFrame::ActivateFrame is not called normally, when I start the app from debugger, or from Windows Explorer.

        void CMainFrame::ActivateFrame(int nCmdShow)
        {
        // TODO: Add your specialized code here and/or call the base class
        MessageBox(_T("AAAA"));
        CMDIFrameWnd::ActivateFrame(nCmdShow);
        }

        Did you try to replace MessageBox call with a TRACE and check whether your text is displayed in the Output window?

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

        Yes, I have:

        void CMainFrame::ActivateFrame(int nCmdShow)
        {
        // TODO: Add your specialized code here and/or call the base class
        TRACE(_T("======================================================AAAA\n"));
        CMDIFrameWnd::ActivateFrame(nCmdShow);
        }

        and there is no trace in output window ...

        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