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

Will there be any difference in the image buffer size if it is loaded in from CString to LPTSTR using GetBuffer()? lptstr = string.GetBuffer(0);

2 Answers  


what is the difference between SDI and MDI

15 Answers   CMC, HCL, Siemens,


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

0 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,


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,


Tell me the different controls in MFC ?

5 Answers  


19)how to set Back Ground Picture to a Dialog Box in MFC ?

1 Answers  


How you find memory leaks?

4 Answers   ABB,


what is the updated verssion in vc++

3 Answers   Aspect,


how does the UIThread and worker thread communicates and handle events

2 Answers   HCL,


What is the difference between hinsrtance and hprevinstance in WinMain function?

3 Answers  


In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?

3 Answers   Financial Technologies,


Categories