|
-
May 3rd, 1999, 10:02 AM
#1
IDR_MAINFRAME
I have a dialog which opens a new resizing-dialog. No big deal, except the new dialog has the windows logo as the icon in the upper left hand corner... how can i change that?
Thanks
-
May 3rd, 1999, 10:30 AM
#2
Re: IDR_MAINFRAME
Go into the Icon folder of your Resource Editor, click on IDR_MAINFRAME, create custom 16x16 and 32x32 icons, and rebuild your program. That should do it.
-
May 3rd, 1999, 06:28 PM
#3
Re: IDR_MAINFRAME
The Icon is OK in the Main Dialog it is the windows logo when i DoModal() on a new dialog that is set for Resizable.
Thanks
-
May 7th, 1999, 04:03 AM
#4
Re: IDR_MAINFRAME
If you just want to remove the icon, then uncheck the "System Menu" option in the Resource editor properties.
Alternatively, if you need the system menu and/or want an icon, add a member variable to your dialog class:
HICON m_hIcon;
Set this member variable in the dialog constructor:
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
Add a WM_INITDIALOG handler and include the following code:
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
Note:
I found this out by copying the code automatically generated for the main dialog of a dialog based application.
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
|