SysMenu Close Not Working |
Post Reply |
Author | |
DougW
Newbie Joined: 03 March 2004 Location: United States Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 12 March 2004 at 10:17am |
I have an application that has a "normal" docking pane as well as a task panel inside of a docking pane. The "normal" pane simply contains a CWnd derived window. The "normal" pane works fine. That is, if I right-click in the title bar to display the system menu and I select Close, it closes the pane. The other pane, which contains a CXTPTaskPanel does not close when I select Close. I have tried the GUI_OneNote sample and it works perfectly. Any idea why my app doesn't respond to the Close? By the way, I put a break-point in the OnDockingPaneNotify event handler and for my Task Panel pane it never gets called. (It does for the other/normal pane). |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Give me the code where you create and attach pane.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
DougW
Newbie Joined: 03 March 2004 Location: United States Status: Offline Points: 8 |
Post Options
Thanks(0)
|
OK, I've figured out a little more... On the pane that doesn't close it's because I am setting the xtpPaneNoCloseable flag. OK, simple enough. However, the close box still appears when I undock the pane (not when docked). I would think that the close box would not be displayed if the NoCloseable flag is set. In any case, the notify handler does not get the event when the flag is set so I cannot tell my users why clicking on the close box isn't doing anything.
|
|
DougW
Newbie Joined: 03 March 2004 Location: United States Status: Offline Points: 8 |
Post Options
Thanks(0)
|
By the way, you can reproduce this using the GUI_OneNote sample. Simply set the NoClosable flag for the pane on the right. I modified the code as follows: CXTPDockingPane* pPaneTasks = m_paneManager.CreatePane(IDR_PANE_NEW, CRect(0, 0,200, 120), dockRightOf); if (pPaneTasks){ pPaneTasks->SetOptions(xtpPaneNoCloseable | xtpPaneNoHideable); }
When you run the app, just undock the pane and you will see a close box. If you set a break-point in the notify handler and click the close box you'll never hit the break-point. If you comment out the SetOptions call then you will hit the break. BTW: I did remember to delete the registry node before each run...
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |