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 |
What are the differences between MFC Exception macros and C++ exception keywords?
What is difference between the TCP/IP and UDP socket
What is the initial function to be called in MFC and what it will do
What is the difference between Struts and JSF? Pls list some most suitable differences.
Why Array Index starts from Zero
What does mfc stand for?
How do I create a dialog box in mfc?
Hi All, I have created one MFC Dialog Based application.now if i am running the application its working fine,instead of closing he application i minimized the application,if i run the application again,i am getting the Dialog. I want to prevent the calling of application multiple times. please give me the code and let me know in which method i need to make changes. Praveer
What is the use of message map ?
What is the difference between the Encapsulation and Abstraction
25 Answers HCL, Invensys, TCS, Wipro,
how to repaint when working with horizontal scroll bar
What is subclassing?