Custom Icon under Windows

lonesock wrote on Friday, February 02, 2007:

I wanted to be able to specify my own icon in a GLFW project of mine, so in case anybody else wants to do the same, here’s the code:

[in win32_window.c]
// modifying this to load a user-specified Icon, if available
wc.hIcon = LoadIcon( wc.hInstance, "GLFW_ICON" ); // Load default icon
if( !wc.hIcon )
wc.hIcon = LoadIcon( NULL, IDI_WINLOGO ); // Load default icon

then all I do is include a whatever.rc file in my project with the line
GLFW_ICON ICON "myicon.ico"

elmindreda wrote on Friday, February 02, 2007:

Hmm, that’s a pretty neat idea. Tagged for future consideration.

peterpp wrote on Friday, February 02, 2007:

I really like this idea. I vote aye. :slight_smile: