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...


1)How to load an icon on a button as Dynamically ?



1)How to load an icon on a button as Dynamically ?..

Answer / 106743013743

Hi Frienz,

Example:-

BOOL Ctharam::OnInitDialog()
{
CDialog::OnInitDialog();

// Below Below, to load icon on button as Dynamic
CButton *btnsample = (CButton *)GetDlgItem(IDC_BUTTON1);
btnsample->ModifyStyle(0,BS_ICON,SWP_FRAMECHANGED);
HICON hIcon = LoadIcon(AfxGetResourceHandle(),
(LPCTSTR)IDI_ICON1);
btnsample->SetIcon(hIcon);

return TRUE;

}

I hope, it might be helpful to you!!!!

By Ctharam

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More MFC Interview Questions

What is subclassing?

2 Answers  


what are the feauters of CObject

4 Answers   Siemens, Wipro,


What is the use of UpdateData funciton ?

7 Answers  


How can i change the color of a dropdowncombobox elements

2 Answers  


List out the basic features of MFC.

4 Answers   Mphasis,


What is the base class for MFC

3 Answers   HCL,


What is Multithreading

1 Answers   Invensys,


What is the difference between ASSERT and VERIFY?

2 Answers  


Difference between Debug and Release versions?

4 Answers  


What is thread & process?

15 Answers   Exaband,


What are the special requirements for dialog box resources used in a form view?

2 Answers  


How to create a Modeless Dialog?

5 Answers  


Categories