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 u can move CDC pointer to one line in cview?
What is userdefine Messages in MFC?
What function is used to disable a control at runtime?
How to handle RTTI in MFC ?
how do u identify RTTI in vc++
How to create a Modeless Dialog?
what is the size of a process
How do I create a dialog box in mfc?
how to repaint when working with horizontal scroll bar
Does the application have more than one object? If Yes, Briefly explain.
1)To Remove WS_MINIMIZEBOX in a Frame ?
1)How to change a text of a button as Dynamically?