I'm pretty new to win32 gui stuff & am having real problems loading an icon into a window. Can anyone see anything wrong with the code below?
Many thanks!
Code:
hFileIcon = (HICON) LoadImage(NULL,
_T("c:\\test.ico"), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE);
hOldIcon = (HICON) SetClassLong(hWnd, GCL_HICON, (LONG) hFileIcon);
// (SetClassLong returns 0 & GetLastError returns 6: The handle is invalid.)
...
...
...
Many thanks!