Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - SysMenu Close Not Working
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SysMenu Close Not Working

 Post Reply Post Reply
Author
Message
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post Topic: SysMenu Close Not Working
    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).

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: 12 March 2004 at 2:36pm
Give me the code where you create and attach  pane.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post 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.

 

Back to Top
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post 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...

 

 

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