[Message Deleted]
-
[Message Deleted]
-
[Message Deleted]
This will help :
HBRUSH CtestMFCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if(nCtlColor== CTLCOLOR_EDIT ) hbr=CreateSolidBrush(RGB(0,100,0)); return hbr; }
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
[Message Deleted]
If you are doing this in
OnCtlColor
handler forWM_CTLCOLOR
notification, and you want to affect the colours of all of edit boxes, then you can try the last argument ofOnCtlColor
, which describes the type of control:HBRUSH CMyDialog::OnCtlColor( CDC * pDC, CWnd * pWnd, UINT nCtlColor) { if(nCtlColor == CTLCOLOR_EDIT) { // set the colour . . . } else { // do not set the colour return CDialog::OnCtlColor(pDC, pWnd, nCtlColor); } }
Hope it helps.
-
[Message Deleted]
Add a class variable that holds the color, and for each edit box, modify that variable.
Maximilien Lincourt Your Head A Splode - Strong Bad
-
If you are doing this in
OnCtlColor
handler forWM_CTLCOLOR
notification, and you want to affect the colours of all of edit boxes, then you can try the last argument ofOnCtlColor
, which describes the type of control:HBRUSH CMyDialog::OnCtlColor( CDC * pDC, CWnd * pWnd, UINT nCtlColor) { if(nCtlColor == CTLCOLOR_EDIT) { // set the colour . . . } else { // do not set the colour return CDialog::OnCtlColor(pDC, pWnd, nCtlColor); } }
Hope it helps.
THANKS A ..... ..................LOT Please mail me
-
This will help :
HBRUSH CtestMFCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if(nCtlColor== CTLCOLOR_EDIT ) hbr=CreateSolidBrush(RGB(0,100,0)); return hbr; }
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
THANKS A LOT Please mail me
-
This will help :
HBRUSH CtestMFCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if(nCtlColor== CTLCOLOR_EDIT ) hbr=CreateSolidBrush(RGB(0,100,0)); return hbr; }
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
We should use the reflect message =WM_CTLCOLOR on CMyEdit more OOPs Oriented. Regards, FarPointer Blog:http://farpointer.blogspot.com/
-
[Message Deleted]
stop deleting your questions when someone gives you the answer you were looking for. it's not the first time i say you this, and you still behave like a SELFISH man :mad: if you don't want others to see the answer anymore, then don't ask it here ; find a friend and ask him whatever you like. but here (and in a general mean on forums), things are written to be read after a more or less time since it was written X| isn't it Mr. Gourav ?! :doh:
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]