CToolbar--How to set the HOT state? 
Author Message
 CToolbar--How to set the HOT state?

Is it possible to set the "hot" state for a toolbar button, similar to
how one sets the "pressed" state using PressButton() or SetState() ?

I have a CToolbar object where I simulate a "drop down" menu *without*
using TBSTYLE_DROPDOWN. Instead I draw the arrow next to the image in
the bitmap. I'm doing this for reasons not worth explaining.

When the user presses the button, the button calls a pop-up menu. The
button pops back up as soon as the pop-up menu is shown, which isn't
usually how such buttons behave. So I sent the TBSTATE_PRESSED state
to the button to keep it down until the pop-up menu goes away.

Unfortunately, this doesn't make the button "hot." The "cold" image is
still shown. And so this is why I'm looking for a way to set the image
"hot" again. Any suggestions?

Call me {*filter*}for wanting the image to be hot, but it just seems funny
having the button pressed with a cold image.

Thanks for any help,

Mario



Wed, 10 Nov 2004 06:11:27 GMT  
 CToolbar--How to set the HOT state?
How about SetHotItem ?



Quote:
> Is it possible to set the "hot" state for a toolbar button, similar to
> how one sets the "pressed" state using PressButton() or SetState() ?

> I have a CToolbar object where I simulate a "drop down" menu *without*
> using TBSTYLE_DROPDOWN. Instead I draw the arrow next to the image in
> the bitmap. I'm doing this for reasons not worth explaining.

> When the user presses the button, the button calls a pop-up menu. The
> button pops back up as soon as the pop-up menu is shown, which isn't
> usually how such buttons behave. So I sent the TBSTATE_PRESSED state
> to the button to keep it down until the pop-up menu goes away.

> Unfortunately, this doesn't make the button "hot." The "cold" image is
> still shown. And so this is why I'm looking for a way to set the image
> "hot" again. Any suggestions?

> Call me {*filter*}for wanting the image to be hot, but it just seems funny
> having the button pressed with a cold image.

> Thanks for any help,

> Mario



Wed, 10 Nov 2004 19:35:45 GMT  
 CToolbar--How to set the HOT state?
Thanks for your response. Eventually I found that function but for
some reason it still doesn't do the trick. Do you know if I need to
set any other styles? I tried passing the index of the item as well as
the command. Still no luck.

Thanks for any help,
Mario

Quote:

> How about SetHotItem ?



Thu, 11 Nov 2004 06:13:48 GMT  
 CToolbar--How to set the HOT state?
I think your toolbar does have to be TB_STYLE_FLAT, TB_STYLEFLAT, whatever
.. if that helps



Quote:
> Thanks for your response. Eventually I found that function but for
> some reason it still doesn't do the trick. Do you know if I need to
> set any other styles? I tried passing the index of the item as well as
> the command. Still no luck.

> Thanks for any help,
> Mario




Quote:
> > How about SetHotItem ?



Thu, 11 Nov 2004 19:27:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Saving and retrieving the state of toolbars CToolBar

2. saving CToolBar state

3. Saving CToolbar's state, Bug?

4. CToolBar with two state buttons

5. CToolBar selection state drawing problem!!

6. CToolBar button click focus state problem

7. how to set hot keys

8. Using a hot-key to set focus to a control

9. hot hot computer jobs, apply now!!

10. Setting CCS_ADJUSTABLE within CToolBar

11. CToolBar setting size of Individual buttons

 

 
Powered by phpBB® Forum Software