[Closed] Changing Caption / Width |
Post Reply |
Author | |
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
Posted: 15 November 2006 at 3:57am |
In the picture below I am failing to have the controls in the second toolbar change width when I change the captions, the captions can change dynamically. This is a modeless dialog.
In another situation where I have a dialog which can be resized as a child of a CFormView I do not have this problem with a toolbar with the same captions. As far as I can tell I have identical code. The widths you see are based on the caption defined for the toolbar in Visual Studio (the Prompt field). How do I force a toolbar to resize the controls based on the caption text? I confused myself badly and ended up chasing my tail through the Codejock sources. Many thanks, Simon |
|
Simon HB9DRV
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
In Dialog case when caption changed, Toolbar sends WM_SIZE to dialog to allow reposition self.
Call RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
in OnSize handler of your dialog.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
Thanks - works great.
Being a modeless non-resizable dialog I didn't have a WM_SIZE handler. Cheers, |
|
Simon HB9DRV
|
|
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 |