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 |
What is subclassing?
what are the feauters of CObject
What is the use of UpdateData funciton ?
How can i change the color of a dropdowncombobox elements
List out the basic features of MFC.
What is the base class for MFC
What is Multithreading
What is the difference between ASSERT and VERIFY?
Difference between Debug and Release versions?
What is thread & process?
What are the special requirements for dialog box resources used in a form view?
How to create a Modeless Dialog?