Print Page | Close Window

Resize button after SetCaption

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=7085
Printed Date: 04 October 2024 at 9:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Resize button after SetCaption
Posted By: csturg
Subject: Resize button after SetCaption
Date Posted: 08 May 2007 at 7:57pm
I have a toolbar on a dialog box. The buttons on the toolbar are configured to show both text and image. Initially the buttons are sized correctly, but if I change the text dynamically using SetCaption, the buttons are not resized to fit the new (and perhaps longer) text. Is there are way to refresh the button sizes after I call SetCaption?
 
Thanks



Replies:
Posted By: Oleg
Date Posted: 09 May 2007 at 1:42am
Hi,
 
In OnSize handler add
 
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
 
or manually call it when tooolbar size changed.


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



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