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 the initial function to be called in MFC and what it will do
what if we provide two message handler for same message ?
Can you explaing the relashionship between document,frame and view ?
What is the difference between the ASSERT and VERIFY macros?
Hi All, i am new for VC++ SDK. i want to get the IP Address of all the External device connected with my local machine.please give the code Regards, Praveer
what is the use of Mutex and critical section
How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?
What is the base class for MFC Framework ?
What are the special requirements for dialog box resources used in a form view?
what is message loop how mfc does it internally?
if both base and derived class have the constructors if i create an object for derive class which class constructor is executed first
what is the use of AFX_MANAGE_STATE ?