Skip to content

Commit

Permalink
Merge pull request #355 from guillep/fix/SetIconOfWindow
Browse files Browse the repository at this point in the history
Fix set icon of window on windows to use wide chars
  • Loading branch information
nicolas-cellier-aka-nice committed Jan 17, 2019
2 parents 0060623 + 4ffdfd2 commit 5a38b34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ sqInt ioSetIconOfWindow(sqInt windowIndex, char * iconPath, sqInt sizeOfPath) {
if(len <= 0) return -1; /* invalid UTF8 ? */
iconPathW[len] = 0;
//Check if file exists and have read rights
if (_waccess(iconPath, 4) == -1) { return -1; };
if (_waccess(iconPathW, 4) == -1) { return -1; };
//Load the image into an icon
HICON hIcon = (HICON)LoadImageW(NULL, iconPathW, IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
if (hIcon == 0)
Expand Down

0 comments on commit 5a38b34

Please sign in to comment.