|
-
May 10th, 1999, 09:35 PM
#1
Change the icon of a dialog
How to change the icon of a dialog in program. I used SetIcon, SetWindowLong,
but there is no effect.
-
May 10th, 1999, 11:08 PM
#2
Re: Change the icon of a dialog
Dialogs within apps typically don't have icons. Are you referring to an icon you have placed on your dialog?
-
May 11th, 1999, 05:48 AM
#3
Re: Change the icon of a dialog
SetIcon works when called from within the dialog (e.g. I added a button on the dialog, and the handler changes the icon).
HICON m_hIcon; //in the CMyDialog header file
void CMyDialog::OnSetIconButton()
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MODALTYPE);
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
}
Derek
-
May 11th, 1999, 05:55 AM
#4
Re: Change the icon of a dialog
By the way, IDR_MODALTYPE is just the id of the icon that came for free with the app, as my app was called "Modal". Substitute the id of your alternative icon.
Derek.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|