Results 1 to 3 of 3

Thread: How do I access a toolbar?

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    How do I access a toolbar?

    I have create a rebar control and a toolbar. The toolbar is a child window of rebar control.

    I have just created and gotten the hwnd of the rebar control that creates the toolbar and sets toolbar as its child window itself. So I am unable to get the hwnd of the toolbar.
    I want to change the state of the buttons on the toolbar at runtime. Do you know how to get the hwnd of toolbar if I have the hwnd of the rebar control?
    Baaaaaaaaah

  2. #2
    Megatron
    Guest
    What method are you using to create the toolbar? If you use CreateWindow() or CreateToolBarEx() both will return the handle to the toolbar.

    Otherwise, I guess you could use the FindWindowEx function.
    Code:
    HWND hToolBar = FindWindowEx(hwndParent, 0, TOOLBARCLASSNAME, NULL);

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I am using CreateWindowEx but I using it in a function that creates the rebar control. Its mean that I can only call one function - rebar control function or toolbar control funcion - because if I call both, I will have one rebar control and a toolbar in the rabar control, and another toolbar.

    I will FindwindowEx

    Thanks
    Baaaaaaaaah

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