![]() |
ToolBar Notification |
Post Reply ![]() |
Author | |
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() 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?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
yes, catch WM_XTP_TOOLBARVISIBLECHANGED message.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Copy some code from CommandBars\DialogSample\DialogSampleDlg.cpp
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Its not so big work.
Here modified sample: CustomThemes.zip
See CMainFrame::RecalcLayout method.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() |
Oleg
Thanks, that worked perfect!
|
|
![]() |
|
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() |
Oleg
How would one handle docking panes?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I guess same method will work with dockingpanes too.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() |
Oleg
Does the toolkitpro dockingpanes have a function like the control bars
RepositionBars() to compute the area size that has changed?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
RepositionBars is method of CMainFrame and it works for DockingPanes too.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
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 |