text output in color
-
I am unable to find any sample code covering the change of color in text output. I would be grasteful for any pointers. Raymond Mercier
I'm not sure if this is what you are asking but theForger has a nice win32 API tutorial. It can be found here: http://www.winprog.org/tutorial/dlgfaq.html
-
I am unable to find any sample code covering the change of color in text output. I would be grasteful for any pointers. Raymond Mercier
-
I am unable to find any sample code covering the change of color in text output. I would be grasteful for any pointers. Raymond Mercier
Try this out (If possible use reflect message in yours )
HBRUSH CMessaJunkDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if (nCtlColor==CTLCOLOR_EDIT ) pDC->SetTextColor (RGB(255,0,0)); return hbr; }
Regards, FarPointer Blog:http://farpointer.blogspot.com/ -
Try this out (If possible use reflect message in yours )
HBRUSH CMessaJunkDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if (nCtlColor==CTLCOLOR_EDIT ) pDC->SetTextColor (RGB(255,0,0)); return hbr; }
Regards, FarPointer Blog:http://farpointer.blogspot.com/ -
I am unable to find any sample code covering the change of color in text output. I would be grasteful for any pointers. Raymond Mercier
in OnPaint function test this code
CPaintDC dc(this); // device context for painting dc.SetTextColor(RGB(0,0,200)); dc.TextOutW(10,10,_T("test"),4);
_**
**_
whitesky