|
-
Aug 8th, 2001, 07:35 PM
#1
Thread Starter
PowerPoster
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?
-
Aug 9th, 2001, 05:16 AM
#2
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);
-
Aug 9th, 2001, 06:48 AM
#3
Thread Starter
PowerPoster
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|