Print Page | Close Window

ToolBar Notification

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7509
Printed Date: 10 May 2024 at 7:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ToolBar Notification
Posted By: Kenneth
Subject: ToolBar Notification
Date 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?



Replies:
Posted By: Oleg
Date Posted: 03 July 2007 at 1:46am
Hello,
 
yes, catch WM_XTP_TOOLBARVISIBLECHANGED message.


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


Posted By: Kenneth
Date 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?


Posted By: Oleg
Date Posted: 03 July 2007 at 2:18pm
Hi,
Copy some code from CommandBars\DialogSample\DialogSampleDlg.cpp


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


Posted By: Kenneth
Date 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
 


Posted By: Oleg
Date Posted: 05 July 2007 at 1:13am
Hi,
 
Its not so big work.
 
Here modified sample: https://forum.codejock.com/uploads/20070705_011313_CustomThemes.zip - CustomThemes.zip
See CMainFrame::RecalcLayout method.


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


Posted By: Kenneth
Date Posted: 05 July 2007 at 11:22am
Oleg
 
Thanks, that worked perfect!
 


Posted By: Kenneth
Date Posted: 06 July 2007 at 3:10pm
Oleg
 
How would one handle docking panes?
 
 


Posted By: Oleg
Date Posted: 07 July 2007 at 3:06am
Hi,
I guess same method will work with dockingpanes too.


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


Posted By: Kenneth
Date 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?


Posted By: Oleg
Date 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


Posted By: Kenneth
Date 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. 



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