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 MFC base classes provide support for ActiveX controls?
Which MFC function is used to display output?
What is the base class for MFC
What is the base class for most MFC classes?
Does the application have more than one object? If Yes, Briefly explain.
What is document-view architecture ? Give me one real time example for SDI ?
What is LPCTSTR? What does LP denote it?
How to find the mouse entering an image?..while entering need to display next image...
What is LoadLibrary function returns?
what is the use of AFX_MANAGE_STATE ?
What is a critical section and how is it implemented?
visual Pogramming c++ coding for create a paint application.. (Please someone help me)