ReBar sizing issue (Win32)

drjackool 956 Reputation points
2023-07-27T05:13:11.2+00:00

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

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,523 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 83,206 Reputation points
    2023-07-27T07:53:43.4366667+00:00

    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 :

    RebarBand

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Jeanine Zhang-MSFT 9,431 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.