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 |
How do I create a dialog box in mfc?
Which Macro is a Super set of other two macro DECLARE_SERIAL,DECLARE_DYNAMIC and DECLARE_DYNCREATE. ?
What is userdefine Messages in MFC?
what is message loop how mfc does it internally?
What is the difference between the SDI and MDI
Explain in sort What is CTargetObject?
What is the base class for most MFC classes?
Does the application have more than one object? If no, then what is the reason?
If i derive a new class from CObject what are the basic features my derived wil get ?
how does conditionally close the Dialog Box ?
if i modified data in 1 view how does the other view knows
How can i implement the dynamic menus in MFC plz give the code