changing icon file of program
I just completed my first window tutorial and everything works fine, but now I just want to change my icon
I created a .rc file with
ICON_MAIN ICON "cobra.ico"
(icon file is in same directory as .rc and .cpp files)
now I changed a line in my winapi winmain()
sampleclass.hIcon = LoadIcon(hinstance, "ICON_MAIN") ;
and I added that rc file to my project (I use vc++)
now I get a linker error
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
Debug/cobra window.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
and yes I use a win32 application and not a console
thanx in advance for any advice
Da cobra
October 27, 2001 10:04 AM
I haven''t done Win32 in a long, long time, but 1) include resource.h (or however it''s called) and 2) try it like this :
sampleclass.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ICON_MAIN));
Once again, I haven''t done Win32 in a long, long time.
Hope this helps.
sampleclass.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ICON_MAIN));
Once again, I haven''t done Win32 in a long, long time.
Hope this helps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement