The online racing simulator
Icon Advice [SOLVED]
(4 posts, closed, started )
Icon Advice [SOLVED]
Hello, this is not very important so I can't spend too much time on it now. But maybe it's simple and someone knows the answer.

The problem is the LFS icon appears everywhere correctly (on the file itself and on the task bar) but doesn't appear on the top left of the window.

Does anyone know why that might be? I am loading the icon from resources using the LoadIcon function, just before I call RegisterClass with a WNDCLASS structure which includes the hIcon result from LoadIcon.

Should I be using LoadImage instead? Or what am I doing wrong? Thanks!
I've never done this myself, but have you tried using SetIcon?

SetIcon(hIcon, TRUE); // Set big icon
SetIcon(hIcon, FALSE); // Set small icon

I have really no idea if that applies or if you're even using MFC, sorry if my post turns out to be completely OT

E: Or maybe
HICON myIcon = LoadIcon(hInstance, "whateverIcon.ico");
winclass.hIcon = myIcon;
winclass.hIconSm = myIcon;

I shouldn't even be posting here, never having touched native windows forms programming...
Solved!
OK - solved!

Thanks Android, that wasn't actually it. I found I was really not loading the icon at all, I was just loading the default "application" icon. And no, I don't use MFC.

I just had to use the resource identifier and it appeared. Seems eating some lunch made me understand the C++ documentation better!

I'll close this thread now.
Whee, good to hear
This thread is closed

Icon Advice [SOLVED]
(4 posts, closed, started )
FGED GREDG RDFGDR GSFDG