Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - ToolBar Notification
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ToolBar Notification

 Post Reply Post Reply
Author
Message
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Topic: ToolBar Notification
    Posted: 02 July 2007 at 5:23pm
Is it possible to receive a notification when a toolbar is showed/hidden in the OnCustomize handler and/or the View-ToolBars?
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: 03 July 2007 at 1:46am
Hello,
 
yes, catch WM_XTP_TOOLBARVISIBLECHANGED message.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2007 at 9:28am

I have a CXTPFrameWnd app that I need to keep the client size constant when a toolbar is made visible/invisible.  It appears currently the frame size is held constant and the client size in changed. 

Before I reinvent the wheel, is there a way to hold the client size constant and change the frame size when a toolbar is made visible/invisible?
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: 03 July 2007 at 2:18pm
Hi,
Copy some code from CommandBars\DialogSample\DialogSampleDlg.cpp
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 04 July 2007 at 7:39pm
We would be willing to retain a consultant with toolkitpro C++ experience to generate code necessary to hold the client area constant and change the frame size whenever a CXTToolBar or MFC CDialogBar is made visible/invisible and or floating/nonfloating and or a change in docking from horizontal/vertical.
 
Post reply to my private mailbox.
 
Ken
 
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: 05 July 2007 at 1:13am
Hi,
 
Its not so big work.
 
Here modified sample: CustomThemes.zip
See CMainFrame::RecalcLayout method.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2007 at 11:22am
Oleg
 
Thanks, that worked perfect!
 
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 06 July 2007 at 3:10pm
Oleg
 
How would one handle docking panes?
 
 
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: 07 July 2007 at 3:06am
Hi,
I guess same method will work with dockingpanes too.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2007 at 9:49am
Oleg
 
Does the toolkitpro dockingpanes have a function like the control bars
RepositionBars() to compute the area size that has changed?
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: 11 July 2007 at 12:05am
Hello,
 
RepositionBars is method of CMainFrame and it works for DockingPanes too.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 10:56am
Oleg
 
Ok, I see what was causing my problem.  When a CXTPToolBar or CDialogBar is made visible/invisible, the RecalcLayout() function is called by MFC.  This is not true of the DockingPanes.  Now when I show or close a docking pane, I call RecalcLayout() and everything works as expected.
 
Thanks a lot for your assistance. 
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.156 seconds.