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 is userdefine Messages in MFC?
if both base and derived class have the constructors if i create an object for derive class which class constructor is executed first
what is the use of CWinApp class?
Which MFC function is used to display output?
If application hangs while SendMessage is waiting for the result, how you handle it?
What is CArchive class dowes?
What is thread & process?
what message is sent to an application when the user presses the primary button?
Tell me about different kinds of synchranization objects ?
Does the application have more than one object? If Yes, Briefly explain.
Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A. Explain how a pointer to function can be declared in C++? B. List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header ("Include") Files.
what is the difference between compiling and building?