I want to assign an icon 32x32 to a property sheet. The property sheet is the main window of the application. I am using VC++4.2 on NT4.0.
I defined the following:
class CAdSheet : public CPropertySheet
m_pMainWnd = &addlg;
HICON secIcon = AfxGetApp()->LoadIcon(IDI_MAINICO);
HWND hWndParent = (HWND)this;
addlg.m_psh.dwFlags |= PSH_USEHICON;
addlg.m_psh.hIcon = secIcon;
nResponse = addlg.DoModal();
The icon IDI_MAINICO is assigned to my property sheet. It appears in the upper left of the window, in the taskbar and in the Explorer as both small and large icons. But, when I use Alt-Tab, the icon is the Windows flag. I would like to have the IDI_MAINICO appear when I Alt-Tab. Is there a way to do this or is this the only way a dialog can appear in that situation?