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,


BOOL Ctharam::OnInitDialog()

// Below Below, to load icon on button as Dynamic
CButton *btnsample = (CButton *)GetDlgItem(IDC_BUTTON1);
HICON hIcon = LoadIcon(AfxGetResourceHandle(),

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

How can i implement the dynamic menus in MFC plz give the code

2 Answers  

what are the feauters of CObject

4 Answers   Wipro, Siemens,

how many types of classes are ther,what are that

7 Answers   L&T,

What is the size of class

18 Answers   Aircom,

what is the use of Mutex and critical section

2 Answers  

2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers

0 Answers   TCS,

Given two processes, how can they share memory?

2 Answers   Microsoft,

How we call a dialog in another dialog?

2 Answers  

What is CArchive class dowes?

4 Answers  

How you create a button dynamically?

2 Answers  

How can i change the color of a dropdowncombobox elements

2 Answers  

Difference between Cclint DC & Cpaint Dc

6 Answers   E Logic,