how to give colour for dialog button or static buuto?any
one explain full code ?pls pls
Answers were Sorted based on User's Feedback
Answer / abhishek kesharwani
Brush *brush;
Initialize the brush pointer in the constructor of your Dialog
Code:
brush = new CBrush(RGB(49,49,49));
Add the WM_CTLCOLR Message handler for the dialog and add the following code
Code:
switch (nCtlColor) {
case CTLCOLOR_BTN:
pDC->SetTextColor(RGB(0, 255, 0));
pDC->SetBkColor(RGB(0, 0, 0));
return (HBRUSH)(brush->GetSafeHandle());
default:
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / harinish
use wm_drawitem function to color the button or static box
| Is This Answer Correct ? | 1 Yes | 5 No |
Answer / pranesh archak
Subclass the control (button or static control) and use
message refelction for message handling.
| Is This Answer Correct ? | 0 Yes | 4 No |
I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)
What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example
What are the special requirements for dialog box resources used in a form view?
What is CArchive class dowes?
1)How to load an icon on a button as Dynamically ?
What is stack size in win32 program?
How to create a Modeless Dialog?
What is Thread ?(VC++)What is the difference between Cmutex and Csemaphone?
how many types of messages are their
How WM_PAINT message gets called in MFC,please explain it . a)Who calls the WM_PAINT message? b)When it gets called? c)how it comes to message queue? Please Explain it
Explain in sort What is CTargetObject?
What is the difference between Extension DLL and Regular DLL?