Original Post
My new app uses DirectX in fullscreen and windowed mode. I copied most of the program code (window init etc..) from my other DX windowed app and all is fine, except im getting the standard win32 icon in the topleft corner of my window bar instead of my icon! (my other app had my custom icon there). The icon shows up when I see it in MyComputer, and as a shortcut, so the icon is loaded into the exe.
heres my code:
//--set up and register window class
wc.style = CS_DBLCLKS;//CS_HREDRAW / CS_VREDRAW;
wc.lpfnWndProc = WindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon( hInstance, MAKEINTATOM(GAME_ICON));
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = GetStockBrush(BLACK_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = NAME;
rc = RegisterClass( &wc );
if ( !rc ) return FALSE;
//-- create a window
hWndMain = CreateWindowEx(
WS_EX_APPWINDOW,
NAME,
TITLE,
WS_VISIBLE /
WS_SYSMENU /
WS_POPUP,
(GetSystemMetrics(SM_CXSCREEN)-640)/2,
(GetSystemMetrics(SM_CYSCREEN)-480)/2,
640,//GetSystemMetrics(SM_CXSCREEN),
480,//GetSystemMetrics(SM_CYSCREEN),
NULL,
NULL,
hInstance,
NULL );
Anyone know why this is happening?