mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[CONSRV]: Hackfix the icons retrieval in the same way as what was done in r65683, because we have a bug in PrivateExtractIconExW.
svn path=/trunk/; revision=66610
This commit is contained in:
parent
c8eb15561c
commit
15f19bca32
1 changed files with 16 additions and 0 deletions
|
@ -476,11 +476,27 @@ Finish:
|
|||
if (IconPath && *IconPath)
|
||||
{
|
||||
HICON hIcon = NULL, hIconSm = NULL;
|
||||
/*
|
||||
* FIXME!! Because of a strange bug we have in PrivateExtractIconExW
|
||||
* (see r65683 for more details), we cannot use this API to extract
|
||||
* at the same time the large and small icons from the app.
|
||||
* Instead we just use PrivateExtractIconsW.
|
||||
*
|
||||
PrivateExtractIconExW(IconPath,
|
||||
ConsoleInitInfo->ConsoleStartInfo->IconIndex,
|
||||
&hIcon,
|
||||
&hIconSm,
|
||||
1);
|
||||
*/
|
||||
PrivateExtractIconsW(IconPath,
|
||||
ConsoleInitInfo->ConsoleStartInfo->IconIndex,
|
||||
32, 32,
|
||||
&hIcon, NULL, 1, LR_COPYFROMRESOURCE);
|
||||
PrivateExtractIconsW(IconPath,
|
||||
ConsoleInitInfo->ConsoleStartInfo->IconIndex,
|
||||
16, 16,
|
||||
&hIconSm, NULL, 1, LR_COPYFROMRESOURCE);
|
||||
|
||||
DPRINT("hIcon = 0x%p ; hIconSm = 0x%p\n", hIcon, hIconSm);
|
||||
if (hIcon != NULL) ConsoleInitInfo->ConsoleStartInfo->hIcon = hIcon;
|
||||
if (hIconSm != NULL) ConsoleInitInfo->ConsoleStartInfo->hIconSm = hIconSm;
|
||||
|
|
Loading…
Reference in a new issue