I'm writing a win32 application with Multiple Document Interface (MDI) child windows. The child windows have the same icon as the main application window (IDI_ICON1).

Everything works fine when I run the application from the Visual Studio Projects folder. But if I move the executable anywhere else, instead of my application icon, the child windows have the Windows warning icon (IDI_EXCLAMATION).

The icon for the child windows is set when defining the window class (wc) for the child windows.

Code:
wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));
Thanks.