Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can't get FrameRgn() to work! :( Pin
Rickard Andersson208-Feb-03 9:39
Rickard Andersson208-Feb-03 9:39 
GeneralRe: Can't get FrameRgn() to work! :( Pin
Mike Nordell9-Feb-03 2:26
Mike Nordell9-Feb-03 2:26 
GeneralFile association launched app... Pin
Dr Soong7-Feb-03 6:33
Dr Soong7-Feb-03 6:33 
GeneralRe: File association launched app... Pin
Neville Franks7-Feb-03 10:02
Neville Franks7-Feb-03 10:02 
GeneralRe: File association launched app... Pin
Dr Soong7-Feb-03 12:17
Dr Soong7-Feb-03 12:17 
GeneralChanging the color of a static text Pin
Tom Wright7-Feb-03 5:19
Tom Wright7-Feb-03 5:19 
GeneralRe: Changing the color of a static text Pin
AlexO7-Feb-03 5:27
AlexO7-Feb-03 5:27 
GeneralRe: Changing the color of a static text Pin
Dr Soong7-Feb-03 8:46
Dr Soong7-Feb-03 8:46 
A really simple way of doing this and givng you control over quit a bit of the control is to subclass the CComboBox and override the OnCtlColor virtual funtion. Example of changing thetext color follows:

HBRUSH CMyComboBox::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
pDC->SetTextColor(RGB(255,255,0));
pDC->SetBkMode(TRANSPARENT);

return m_Brush;
}

In addition to chaging the text color, the disply mode will be transoarent so you don't have to worry about a background color, however, you could change that as well. The m_Brush being returned is a var that is defined in the constuctor so that the entire controls background uses that brush to paint the controls background.

This method can be used on any of the control, listbox, edit, ect.

GeneralCatching Exceptions in MFC Pin
Tom Wright7-Feb-03 5:10
Tom Wright7-Feb-03 5:10 
GeneralRe: Catching Exceptions in MFC Pin
AlexO7-Feb-03 5:34
AlexO7-Feb-03 5:34 
GeneralVisual C++ wizard Pin
De Nardis Andrea7-Feb-03 5:03
De Nardis Andrea7-Feb-03 5:03 
Questionhow to set CListbox row height variable? Pin
hamchoy7-Feb-03 4:52
hamchoy7-Feb-03 4:52 
AnswerRe: how to set CListbox row height variable? Pin
Roger Allen7-Feb-03 6:07
Roger Allen7-Feb-03 6:07 
GeneralCPen Pin
Ahmad997-Feb-03 3:55
Ahmad997-Feb-03 3:55 
GeneralRe: CPen Pin
Joaquín M López Muñoz7-Feb-03 4:00
Joaquín M López Muñoz7-Feb-03 4:00 
GeneralRe: CPen Pin
Ahmad997-Feb-03 4:09
Ahmad997-Feb-03 4:09 
GeneralRe: CPen Pin
Maximilien7-Feb-03 4:19
Maximilien7-Feb-03 4:19 
GeneralCTreeCtrl Pin
will13837-Feb-03 3:51
will13837-Feb-03 3:51 
GeneralRe: CTreeCtrl Pin
Joaquín M López Muñoz7-Feb-03 3:59
Joaquín M López Muñoz7-Feb-03 3:59 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 4:11
will13837-Feb-03 4:11 
GeneralRe: CTreeCtrl Pin
Joaquín M López Muñoz7-Feb-03 4:33
Joaquín M López Muñoz7-Feb-03 4:33 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 4:36
will13837-Feb-03 4:36 
GeneralRe: CTreeCtrl Pin
Joaquín M López Muñoz7-Feb-03 4:43
Joaquín M López Muñoz7-Feb-03 4:43 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 4:50
will13837-Feb-03 4:50 
GeneralRe: CTreeCtrl Pin
will13837-Feb-03 5:31
will13837-Feb-03 5:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.