Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - DockingPaneAutoHideWnd::CloseWindow Issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DockingPaneAutoHideWnd::CloseWindow Issue

 Post Reply Post Reply
Author
Message
developer View Drop Down
Newbie
Newbie


Joined: 05 August 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote developer Quote  Post ReplyReply Direct Link To This Post Topic: DockingPaneAutoHideWnd::CloseWindow Issue
    Posted: 24 August 2004 at 3:07pm
When the pane hides, the OnTimer event calls this code


     if (nIDEvent == TID_SLIDEOUT && m_bSlideOut)
     {
             m_nSlideStep--;
             if (m_nSlideStep > -1) DoSlideStep();
             else
             {
                  m_bSlideOut = FALSE;
                  KillTimer(TID_SLID EOUT);
                   CloseWindow( ); <-- Here
              }
     }


which calls the CloseWindow code


void CXTPDockingPaneAutoHideWnd::CloseWindow()
{
     if (!IsWindow(m_hWnd))
             return;

     ShowWindow(SW_HIDE);
     if (m_pPane && m_pPane->GetSafeHwnd() && m_pPane->GetParent() == this)
      {     ;  ;
             m_pPane->ShowWindow(SW_HIDE);
              m_pPane->SetParentFrame(GetDockingPaneM anager()->GetSi te());     
      }
     m_pPane = 0;

     if (m_pPanel && m_pPanel->m_pActiveWnd == this)
             m_pPanel->m_pActiveWnd = 0;

     PostMessage(WM_CLOSE); <-- Here
}


but the PostMessage gets the active document and tries to close it... That is a problem. It is getting the document in my CMDIChildFrameWnd (which has changed) and tries to close the document. Why is this happening? Every time someone Autohides a pane and has modified the document, It asks if the user wants to save... they are not closing any document. they are Auto Hiding a pane. Please help.

Edited by developer
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2004 at 1:39am

???

PostMessage sends WM_CLOSE to self window.  

Can I see you code?

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
developer View Drop Down
Newbie
Newbie


Joined: 05 August 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote developer Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2004 at 12:05pm
I will send you an example...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.187 seconds.