If I call RB_SETBANDINFO with RBBIM_CHILDSIZE and cxMinChild & cyMinChild, it works if I test on the MS sample after having changed the Toolbar height :
ReBar sizing issue (Win32)

Hi
Platform: Win32/VC++
In my app I have a rebar with one toolbar child. My problem is when the toolbar height changes (because I add option to customize toolbar and to hide/show toolbar buttons text) the rebar band height is not changes as auto! Is there a way to do it auto or I have to update band info data after each time toolbar customized?
Thanks
1 additional answer
Sort by: Most helpful
-
Jeanine Zhang-MSFT 10,546 Reputation points Microsoft Vendor
2023-07-27T07:32:31.4466667+00:00 Hello,
Welcome to Microsoft Q&A!
The REBARBANDINFO structure members define the traits of a given band. To set a band's traits, set the cbsize member to indicate the size of the structure, in bytes. Have you set the
cbsize
member? Try to create the Rebar first and then create toolbar control.If I misunderstand you, could you please provide the sample to help us reproduce the issue?
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.