I have created a class derived from CToolbarCtrl.
in this class i have added some push buttons and some dropdown
buttons.In which one of them is setting button.when i click this button

a property sheet is displayed in which i can select and deselect a lot
of options about to display a specif button on the toolbar or not.
Suppose when the user selects the checkbox of "Mails" and then apply
button pressed ,i want to appear that button on the toolbar and if S/He

Uncheck the "Mails" checkbox i want to disappear the toolbar Mails
button.

to solve this problem i have send a user defined message from the
propertyPage class to the toolbar so that in this message handler i
could place my code to Appear/Disappear my "mails" button.


I m trying to use the function
HideButton() of CToolbarCtrl class in my user defined message handler
but this is not working.i want that when user press the apply button
the button should be reflect the changes.
another way i have tried is that the buttons which i have added into
the toolbar ,itried to set their "fsState" to TBSTATE_ENABLE or
TBSTATE_HIDDEN, these techniques work but when i close the IE instance

and start it again.i just want to reflect the changes the user have
made in the Option page of propertysheet class.
plz help me where i m making a mistake.
Another thing is that i have make a funtion "Create" in the
CToolbarCtrl derived class in which i m adding the buttons in the
toolbar.and this is used as a Dll.


plz tell me .
Thanks in advance.


CrimeMaster

Re: CToolbarCtrl problem by Alex

Alex
Sat Jun 24 05:01:06 CDT 2006

CrimeMaster wrote:
> I have created a class derived from CToolbarCtrl.
> in this class i have added some push buttons and some
> dropdown buttons.In which one of them is setting
> button.when i click this button
>
> a property sheet is displayed in which i can select and
> deselect a lot of options about to display a specif
> button on the toolbar or not. Suppose when the user
> selects the checkbox of "Mails" and then apply button
> pressed ,i want to appear that button on the toolbar and
> if S/He
>
> Uncheck the "Mails" checkbox i want to disappear the
> toolbar Mails button.

If I understand you correctly, you want customization
ability for your toolbar. This feature already exists in
toolbar control. No need to implement it by yourself. All
you need to do is to store toolbar state somewhere between
customizations made by user. Read here about toolbar
customization:

"Using Toolbar Controls"
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/toolbar/toolbar_using.asp

Note "Customizing Toolbars" section.

HTH
Alex