Print Page | Close Window

SysMenu Close Not Working

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=521
Printed Date: 04 December 2024 at 2:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SysMenu Close Not Working
Posted By: DougW
Subject: SysMenu Close Not Working
Date 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).




Replies:
Posted By: Oleg
Date Posted: 12 March 2004 at 2:36pm
Give me the code where you create and attach  pane.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: DougW
Date Posted: 19 March 2004 at 1:05pm

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.

 



Posted By: DougW
Date Posted: 19 March 2004 at 1:11pm

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

 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net