CToolbar with dynamic buttons problem
Posted on 2005-04-13
Hi to all,
I have to create a toolbar where the buttons are to be inserted dynamically by the applicartion.
Adding these buttons is not the problem but these buttons are grayed and can not be enabled using the EnableButton function from class CToolBarCtrl.
If I set the button ID to an existing menu ID which is mapped, then the button is enabled but my IDs are dynamic and windows is making a process which disable buttons because no function is mapped.
The mapping is done in the OnCommand function of my Main Frame.
Any idea to avoid windows to disable these buttons and let me handle it my self ?