Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



how to give colour for dialog button or static buuto?any one explain full code ?pls pls..

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

how to give colour for dialog button or static buuto?any one explain full code ?pls pls..

Answer / harinish

use wm_drawitem function to color the button or static box

Is This Answer Correct ?    1 Yes 5 No

how to give colour for dialog button or static buuto?any one explain full code ?pls pls..

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

Post New Answer

More MFC Interview Questions

what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?

0 Answers  


What function is used to disable a control at runtime?

7 Answers  


What function is called by a document class to notify views that the document has been changed?

2 Answers  


How to handle RTTI in MFC ?

1 Answers  


Explain in sort What is CTargetObject?

2 Answers  


What is LoadLibrary function returns?

7 Answers  


What MFC base classes provide support for ActiveX controls?

2 Answers   Wipro,


How can i change the color of a dropdowncombobox elements

2 Answers  


What is a message map, and what is the advantage of a message map over virtual functions?

1 Answers  


I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)

2 Answers   Invensys,


What is mfc class hierarchy?

0 Answers  


Hi can anyone explain about the synchronization objects types and where we are using in the code.

1 Answers  


Categories