Re: Changing the Small and Big icons of a window using LoadImage... How to?
Quote:
Originally Posted by
Arianax
No improvement.
Could you post (attach to your post) your icon file?
Re: Changing the Small and Big icons of a window using LoadImage... How to?
Quote:
Originally Posted by
VictorN
Could you post (attach to your post) your icon file?
I was thinking the same thing... it must be the .ico file...
I have made this file simply by saving a 16x16 .bmp with MSPAINT as a 256color bitmap with the file extension .ico:
I get the error message 'invalid file' when I try to upload a .ico file to this site... Maybe I have created it incorrectly..?
Visual Studio 2017 interprets the file as a BMP if I attach it to the Resource Editor (something I don't want to do since I prefer LoadImage() to LoadIcon()).
Re: Changing the Small and Big icons of a window using LoadImage... How to?
IT WORKS!!!
It turned out that I needed to convert the standard 24-Bit BMP file into a .ico file using a specialized Icon Converter piece of software.
The only strange thing is:
I still receive the error messages when I do error checking, but the icon appears correctly when the Window is created during Debug mode.
So the following code works effectively:
Code:
HICON hIconSm = (HICON)LoadImage(NULL, L"Icon.ico", ICON_IMAGE, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
Many thanks for all your assistance Victor...
Re: Changing the Small and Big icons of a window using LoadImage... How to?
Quote:
Originally Posted by
Arianax
I still receive the error messages when I do error checking, but the icon appears correctly when the Window is created during Debug mode.
So the following code works effectively:
Code:
HICON hIconSm = (HICON)LoadImage(NULL, L"Icon.ico", ICON_IMAGE, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
Again: what error message and how did you check it?