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 does the UIThread and worker thread communicates and handle events

2 Answers   HCL,


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

1 Answers  


How many types of combo box are their

2 Answers   Aaditya Info Solutions, E Logic,


1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


What is document-view architecture ? Give me one real time example for SDI ?

2 Answers  


What is mfc class hierarchy?

0 Answers  


Given two processes, how can they share memory?

2 Answers   Microsoft,


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 the use of AFX_MANAGE_STATE ?

4 Answers   HCL,


How to convert a CString variable to char* or LPTSTR?

5 Answers   Dover,


1)why we cant create more than one instance of the class Derived from CWinApp

5 Answers   Alstom,


Whats is DDX & DDV in MFC?

1 Answers   HCL,


Categories