Results 1 to 40 of 4199

Thread: CommonControls (Replacement of the MS common controls)

Threaded View

  1. #11

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    ToolBar buttons can have a dropdown button menu only without submenus.
    Of course you can handle the ButtonDropDown event and show your own menu. However, it would be easier to just supply a menu handle to a button object which takes care of positioning, exclude rects, WM_CANCELMODE upon recursive invocation, left or right align etc. already built-in in the ToolBar control.

    Therefore included the hMenu run-time property in the TbrButton object.
    Returns/sets a handle to a popup menu which will be used as a button dropdown menu.
    This is especially useful when a menu with submenus is needed. You can supply whatever menu which is accepted by TrackPopupMenuEx. (e.g. GetMenu()+GetSubMenu() of a VB.Form)
    Included ButtonMenuClick2 event in the ToolBar control.

    Your application is responsible for destroying the menu handle when it is no longer needed. Best is to also set Button.hMenu to 0 when your app destroys the menu handle.
    Last edited by Krool; May 2nd, 2024 at 12:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width