DavidCrow wrote:
How about: IDR_MAINFRAME1 ICON "..\\res\\MAIN.ico" IDR_MAINFRAME2 ICON "..\\res\\MAIN.ico" IDR_MAINFRAME3 ICON "..\\res\\SECONDARY.ico" ... CMyDlg::CProgressTestDlg(CWnd* pParent /*=NULL*/) : CDialog(CMyDlg::IDD, pParent) { #if defined(APSTUDIO_INVOKED) m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME1); #elif defined(MAIN_PROG) m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME2); #else m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME3); #endif }
If I'm reading the above correctly, this will cause the program to use the correct icon when it is running, but not when the executable is being displayed in explorer, folder browser, etc. It would appear that windows uses the icon with the lowest ID number for for this.