|
-
June 4th, 2019, 09:10 AM
#16
Re: Changing the Small and Big icons of a window using LoadImage... How to?
 Originally Posted by Arianax
No improvement.
Could you post (attach to your post) your icon file?
Victor Nijegorodov
-
June 4th, 2019, 10:27 AM
#17
Re: Changing the Small and Big icons of a window using LoadImage... How to?
 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()).
Last edited by Arianax; June 4th, 2019 at 10:35 AM.
-
June 4th, 2019, 10:55 AM
#18
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...
-
June 4th, 2019, 11:18 AM
#19
Re: Changing the Small and Big icons of a window using LoadImage... How to?
 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?
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|