Bitmap buttons and dialog bars 
Author Message
 Bitmap buttons and dialog bars

Hi All,

  I've been wading thru the complexities of getting that blasted
bitmap button on a dialog bar.  I used some info from codeguru to
create the dialogbar class that incorporates Oninitdialog.  so here is
where I am...

  I have the bitmap buttons on the dialog bar, they appear to load up
correctly via Oninit.  I am getting stuck on trying to latch the
buttons down however.  I want them to behave like a toolbar button
when you setcheck.  I use the SetState function to set the button
down, but as soon as my mouse moves off (left mouse click long since
done), the button retuns to the up state.  It is like something
changes with the focus.

Any help appreciated,

Greg Cole



Sat, 31 Jul 2004 02:57:23 GMT  
 Bitmap buttons and dialog bars

Quote:
>  I have the bitmap buttons on the dialog bar, they appear to load up
>correctly via Oninit.  I am getting stuck on trying to latch the
>buttons down however.

Greg,

If you want a button that latches, start from a check box and set the
push-like style - that should give you what you want.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 31 Jul 2004 04:02:31 GMT  
 Bitmap buttons and dialog bars
Dave,

  Thanks for the tip.  I have that going but I'm having some
difficulty with that approach in getting the bitmap to look correct.

  With the bitmap button approach I'm almost there.  The odd thing is
this:

The button is used to toggle a mode.  When I use the hot key (alt-l)
the button responds properly, changing to the correct bitmap.  When I
left click the button, it also responds correctly UNTIL the mouse
cursor leaves the dialog bar.  The button then returns to the up state
for some reason that I have yet to figure.  Any ideas?

  Anywho, I'm trying to tweak both approaches until I get one to work.
 I appreciate the input.

Greg

Quote:

> >  I have the bitmap buttons on the dialog bar, they appear to load up
> >correctly via Oninit.  I am getting stuck on trying to latch the
> >buttons down however.

> Greg,

> If you want a button that latches, start from a check box and set the
> push-like style - that should give you what you want.

> Dave



Sat, 31 Jul 2004 22:24:13 GMT  
 Bitmap buttons and dialog bars

Quote:
>  Thanks for the tip.  I have that going but I'm having some
>difficulty with that approach in getting the bitmap to look correct.

>  With the bitmap button approach I'm almost there.  The odd thing is
>this:

>The button is used to toggle a mode.  When I use the hot key (alt-l)
>the button responds properly, changing to the correct bitmap.  When I
>left click the button, it also responds correctly UNTIL the mouse
>cursor leaves the dialog bar.  The button then returns to the up state
>for some reason that I have yet to figure.  Any ideas?

Sorry Greg, nothing comes to mind.

I'm assuming you're referring to using CBitmapButton? I've not used
that since 16-bit MFC days since the BS_ICON style for a button has
done all that I've needed.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 31 Jul 2004 23:32:47 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Dialog Bars and Bitmap Buttons

2. how can i add menu and button bar to a dialog

3. Buttons on a dialog bar

4. HELP NEEDED: Modal Dialog pops up with own button in task bar

5. Dialog Bars and Buttons

6. Detecting dialog bar being hidden by command button

7. Launch dialog from Floating Tool Bar by double clicking on a button

8. button in dialog bar

9. Dialog Box menu bar and Media Control buttons

10. Dialog box menu bar and Media Control buttons

11. button on dialog bar always disabled?

12. Manipulating buttons on my dialog bar?

 

 
Powered by phpBB® Forum Software