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
Printable View
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
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.
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
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.