Click here to Skip to main content
16,010,268 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: hmmmm.... another one Pin
l a u r e n26-Mar-01 11:30
l a u r e n26-Mar-01 11:30 
GeneralRe: hmmmm.... another one Pin
Erik Funkenbusch26-Mar-01 12:39
Erik Funkenbusch26-Mar-01 12:39 
GeneralRe: hmmmm.... another one Pin
Tim Deveaux26-Mar-01 13:31
Tim Deveaux26-Mar-01 13:31 
Generalsolution... Pin
l a u r e n26-Mar-01 20:43
l a u r e n26-Mar-01 20:43 
QuestionBug with RichEdit2 and EM_FORMATRANGE? Pin
26-Mar-01 0:22
suss26-Mar-01 0:22 
Generaldumbass question... Pin
l a u r e n26-Mar-01 0:02
l a u r e n26-Mar-01 0:02 
GeneralRe: dumbass question... Pin
26-Mar-01 0:30
suss26-Mar-01 0:30 
GeneralRe: dumbass question... Pin
l a u r e n26-Mar-01 1:08
l a u r e n26-Mar-01 1:08 
funny how you never look at old code huh?
heh ... sheesh

lbrush is a LOGBRUSH is a dlg local var
m_brush is a dlg local cbrush

HBRUSH CDlgIdiot::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (nCtlColor == CTLCOLOR_STATIC && pWnd->GetDlgCtrlID() == IDC_WHATEVER){
pDC->SetBkColor(RGB(...));
lbrush.lbStyle = BS_SOLID;
lbrush.lbColor = RGB(...);
m_brush.CreateBrushIndirect(&lbrush);
hbr = (HBRUSH)m_brush.GetSafeHandle();
}
return hbr;
}

i think this is the right way



---
"every year we invent better idiot proof systems and every year they invent better idiots"
GeneralRe: dumbass question... Pin
Christian Graus26-Mar-01 10:05
protectorChristian Graus26-Mar-01 10:05 
GeneralRe: dumbass question... Pin
Chris Meech26-Mar-01 10:35
Chris Meech26-Mar-01 10:35 
GeneralRe: dumbass question... Pin
l a u r e n26-Mar-01 11:32
l a u r e n26-Mar-01 11:32 
GeneralAcces Violation with oledb CoUninitialize() instruction Pin
25-Mar-01 23:11
suss25-Mar-01 23:11 
GeneralRe: Acces Violation with oledb CoUninitialize() instruction Pin
25-Mar-01 23:34
suss25-Mar-01 23:34 
GeneralSome problem when hosting WebBrowser control in an application Pin
25-Mar-01 21:17
suss25-Mar-01 21:17 
QuestionHow resize dialog bar when it is in docked mode ? Pin
25-Mar-01 21:15
suss25-Mar-01 21:15 
QuestionHow resize dialog bar when it is in docked mode ? Pin
25-Mar-01 21:15
suss25-Mar-01 21:15 
QuestionHow to copy the value of _bstr_t into a BSTR variable?? Pin
25-Mar-01 20:56
suss25-Mar-01 20:56 
AnswerRe: How to copy the value of _bstr_t into a BSTR variable?? Pin
Erik Thompson25-Mar-01 21:21
sitebuilderErik Thompson25-Mar-01 21:21 
General1] OnKillFocus and RichEdit Ctrl - 2] Always on top Pin
25-Mar-01 20:37
suss25-Mar-01 20:37 
GeneralWeb Service Deployment problem Pin
Kannan Kalyanaraman25-Mar-01 19:10
Kannan Kalyanaraman25-Mar-01 19:10 
GeneralRe: Web Service Deployment problem Pin
Gerry25-Mar-01 21:02
Gerry25-Mar-01 21:02 
GeneralChanging the clock text Pin
Greg Hedlund25-Mar-01 13:59
Greg Hedlund25-Mar-01 13:59 
GeneralRecognizing a voice Pin
Antonio25-Mar-01 13:45
Antonio25-Mar-01 13:45 
GeneralDevStudio macro to open (and position) file Pin
Ravi Bhavnani25-Mar-01 10:48
professionalRavi Bhavnani25-Mar-01 10:48 
GeneralRe: DevStudio macro to open (and position) file Pin
Kannan Kalyanaraman25-Mar-01 22:07
Kannan Kalyanaraman25-Mar-01 22:07 

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.