Background color and text color in menu 
Author Message
 Background color and text color in menu

Hi,

Does anybody know how to change the background color in a menu.

Also, I want to set up a menu so that the background color behind an
item and the text color of the item will change when the user mouses
over it. Anybody have any idea of how I could do this?

Thanks,
James Bender

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 03 Mar 2003 03:00:00 GMT  
 Background color and text color in menu

Quote:

> Hi,

> Does anybody know how to change the background color in a menu.

> Also, I want to set up a menu so that the background color behind an
> item and the text color of the item will change when the user mouses
> over it. Anybody have any idea of how I could do this?

> Thanks,
> James Bender

Menus can be set to owner-draw style.  Then you paint it all yourself.

--
Scott McPhillips [VC++ MVP]



Mon, 03 Mar 2003 03:00:00 GMT  
 Background color and text color in menu


Quote:


> > Hi,

> > Does anybody know how to change the background color in a menu.

> > Also, I want to set up a menu so that the background color behind an
> > item and the text color of the item will change when the user mouses
> > over it. Anybody have any idea of how I could do this?

> > Thanks,
> > James Bender

> Menus can be set to owner-draw style.  Then you paint it all yourself.

> --
> Scott McPhillips [VC++ MVP]

So, does this mean I need to do on OnPaint in a CMenu class? How would
I do the "Mouse over" for the text color change?

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 04 Mar 2003 03:00:00 GMT  
 Background color and text color in menu

Quote:

> > Menus can be set to owner-draw style.  Then you paint it all yourself.

> So, does this mean I need to do on OnPaint in a CMenu class? How would
> I do the "Mouse over" for the text color change?

CMenu has special functions for this.  My quick search of MSDN for "owner draw
menu" finds there is sample code in the CTRLTEST MFC sample.

--
Scott McPhillips [VC++ MVP]



Tue, 04 Mar 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Background Color, Text Color

2. Change text color and background color in CEditView

3. Change a part of Background color or a part of text color from CListCtrl

4. set the text color and the background color of a Control Cbutton

5. Win2K: static background color vs. CFormView background color

6. problem: How to change the background color of menu items and menu bar

7. CEditView Background Color & Font Color :: MFC

8. Detecting Color Pallete ( 16 colors , or 256 colors, or Hi color) URGENT

9. CTreeCtrl Color/Background Color Q

10. Changing Menu Background Color in C# Windows Forms

11. Setting background color of toolbar and menu

12. change background color of menus in winxp

 

 
Powered by phpBB® Forum Software