Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Resize button after SetCaption
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Resize button after SetCaption

 Post Reply Post Reply
Author
Message
csturg View Drop Down
Newbie
Newbie


Joined: 13 July 2005
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote csturg Quote  Post ReplyReply Direct Link To This Post Topic: Resize button after SetCaption
    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
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: 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
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.125 seconds.