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

How do I create a dialog box in mfc?

0 Answers  


Which Macro is a Super set of other two macro DECLARE_SERIAL,DECLARE_DYNAMIC and DECLARE_DYNCREATE. ?

2 Answers   Sony,


What is userdefine Messages in MFC?

1 Answers   HCL,


what is message loop how mfc does it internally?

4 Answers   Aspire,


What is the difference between the SDI and MDI

3 Answers   Invensys,


Explain in sort What is CTargetObject?

2 Answers  


What is the base class for most MFC classes?

7 Answers   CMC, Siemens,


Does the application have more than one object? If no, then what is the reason?

5 Answers  


If i derive a new class from CObject what are the basic features my derived wil get ?

4 Answers   Microsoft,


how does conditionally close the Dialog Box ?

2 Answers   Infotech,


if i modified data in 1 view how does the other view knows

2 Answers   Siemens,


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

2 Answers  


Categories