I am trying to finish up a personal project of mine, but am running into an aesthetic problem.
I can't get the window to recognize the hIconSm when I try to set it.
WNDCLASSEX wnd;
ZeroMemory(&wnd,sizeof(wnd));
wnd.cbSize = sizeof(WNDCLASSEX);
wnd.hInstance = hInstance;
wnd.lpfnWndProc = (WNDPROC) WindowProc;
wnd.hCursor = LoadCursor(NULL,IDC_ARROW);
wnd.hbrBackground = (HBRUSH)COLOR_WINDOW;
wnd.hIconSm = (HICON)LoadImage(hInstance,MAKEINTRESOURCE(IDI_ICON1),IMAGE_ICON,GetSystemMetrics(SM_CXICON),GetSystemMetrics(SM_CYICON),0);
wnd.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(IDI_ICON1));
wnd.lpszClassName = GameName.c_str();
I tried that
WNDCLASSEX wnd;
ZeroMemory(&wnd,sizeof(wnd));
wnd.cbSize = sizeof(WNDCLASSEX);
wnd.hInstance = hInstance;
wnd.lpfnWndProc = (WNDPROC) WindowProc;
wnd.hCursor = LoadCursor(NULL,IDC_ARROW);
wnd.hbrBackground = (HBRUSH)COLOR_WINDOW;
wnd.hIconSm = LoadIcon(hInstance,MAKEINTRESOURCE(IDI_ICON1));
wnd.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(IDI_ICON1));
wnd.lpszClassName = GameName.c_str();
and I tried a method I read on the internet where I put the code below in my WndProc Function.
case WM_CREATE:
SendMessage(hWnd,WM_SETICON,ICON_SMALL,(LPARAM)MAKEINTRESOURCE(IDI_ICON1));
break;
}
However, NONE of these methods have produced results. Any help would be appreciated.