Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » More toolbar Collapse All
Subject Author Date
Jonas Gauffin Jul 16, 2005 - 2:59 AM

I have a SDI app.
On the toolbar I got a button with id ID_PLAY_NEXT.

I also have a ControlBar with a Dialog in it.
In the dialog I try to catch the command ID_PLAY_NEXT with ON_COMMAND(ID_PLAY_NEXT, OnPlayNext).
It do not work. However, if I do exactly the same in CMainFrame it do work. How can I catch it in the child dialog?

Another question. How do I use a hottrack bitmap for the toolbar?

Technical Support Jul 16, 2005 - 9:32 AM

You should call the SetOwner() method of your toolbar in the dialog and specify a pointer to the dialog object. This will tell the toolbar window to send command messages to the dialog window.

The CExtToolControlBar class does not keep images at all. It manages a collection of CExtBarButton objects. Each button object knows only its command identifier value. The CExtBarButton class uses images stored in the command manager for each registered command. The command manager keeps only one image for each command identifier. This design does not allow you to implement toolbars with a hot-track button effect. To implement a hot-track effect, create a CExtBarButton-derived class in which you need to implement this effect. You could even store several images. This is done in the FunnyBars sample (see the CFunnyToolButton class for details).