Click here to Skip to main content
16,011,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCFile and CArchive ... Pin
Hadi Rezaee14-Mar-01 20:35
Hadi Rezaee14-Mar-01 20:35 
GeneralRe: CFile and CArchive ... Pin
Erik Funkenbusch15-Mar-01 11:45
Erik Funkenbusch15-Mar-01 11:45 
GeneralRules ... Pin
Hadi Rezaee14-Mar-01 20:34
Hadi Rezaee14-Mar-01 20:34 
GeneralRe: Rules ... Pin
Christian Graus14-Mar-01 22:15
protectorChristian Graus14-Mar-01 22:15 
GeneralAllocate memory ... Pin
Hadi Rezaee14-Mar-01 20:33
Hadi Rezaee14-Mar-01 20:33 
GeneralRe: Allocate memory ... Pin
Christian Graus14-Mar-01 22:31
protectorChristian Graus14-Mar-01 22:31 
GeneralRe: Allocate memory ... Pin
Hadi Rezaee16-Mar-01 19:28
Hadi Rezaee16-Mar-01 19:28 
GeneralChange color problem ... Pin
Hadi Rezaee14-Mar-01 20:29
Hadi Rezaee14-Mar-01 20:29 
<<< In the name of GOD >>>
Hi.
I want to change text color with CColorDialog.
I have little problem, becuase for changing color, i must
click on edit box and then color will change ...
It mean when i click on OK button,
text color won't change, and i must click on the edit box
to change color.

void CTestglobalDlg::OnOK()
{
CColorDialog m_ColorDlg;
if(m_ColorDlg.DoModal() == IDOK)
{
Ced = m_ColorDlg.GetColor();
}
}

HBRUSH CTestglobalDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor == CTLCOLOR_EDIT)
{
pDC->SetTextColor(Ced);
}
return hbr;
}

Ced is member variable:
COLORREF Ced = RGB(0,0,0);

You can test it.
I want to change color with out click on edit box.
Please help me ...
Dead | X|

Hadi Rezaie
GeneralRe: Change color problem ... Pin
Christian Graus14-Mar-01 22:20
protectorChristian Graus14-Mar-01 22:20 
GeneralSome questions about STL ... Pin
Hadi Rezaee14-Mar-01 20:28
Hadi Rezaee14-Mar-01 20:28 
GeneralRe: Some questions about STL ... Pin
Erik Funkenbusch15-Mar-01 11:50
Erik Funkenbusch15-Mar-01 11:50 
GeneralGetting information from a database... Pin
14-Mar-01 17:36
suss14-Mar-01 17:36 
GeneralRe: Getting information from a database... Pin
15-Mar-01 4:45
suss15-Mar-01 4:45 
GeneralObtaining Process info Pin
14-Mar-01 16:45
suss14-Mar-01 16:45 
GeneralRe: Obtaining Process info Pin
James R. Twine15-Mar-01 5:28
James R. Twine15-Mar-01 5:28 
GeneralATL/COM question Pin
Christian Graus14-Mar-01 14:02
protectorChristian Graus14-Mar-01 14:02 
QuestionHow to excute my program when.... Pin
14-Mar-01 14:00
suss14-Mar-01 14:00 
AnswerRe: How to excute my program when.... Pin
Christian Graus14-Mar-01 14:05
protectorChristian Graus14-Mar-01 14:05 
GeneralBitmap Procedure works - but no Bitmap appears on the screen!! Pin
14-Mar-01 8:52
suss14-Mar-01 8:52 
GeneralRe: Bitmap Procedure works - but no Bitmap appears on the screen!! Pin
Christian Graus14-Mar-01 11:40
protectorChristian Graus14-Mar-01 11:40 
General__stdcall and Member Functions Pin
Rhoam14-Mar-01 8:12
Rhoam14-Mar-01 8:12 
GeneralRe: __stdcall and Member Functions Pin
Chris Losinger14-Mar-01 9:04
professionalChris Losinger14-Mar-01 9:04 
GeneralRe: __stdcall and Member Functions Pin
Erik Funkenbusch14-Mar-01 11:47
Erik Funkenbusch14-Mar-01 11:47 
Questiongantt? Pin
bogdan14-Mar-01 7:48
bogdan14-Mar-01 7:48 
AnswerRe: gantt? Pin
David Cunningham14-Mar-01 12:23
cofounderDavid Cunningham14-Mar-01 12:23 

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.