mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 16:35:49 +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)
|
if (IconPath && *IconPath)
|
||||||
{
|
{
|
||||||
HICON hIcon = NULL, hIconSm = NULL;
|
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,
|
PrivateExtractIconExW(IconPath,
|
||||||
ConsoleInitInfo->ConsoleStartInfo->IconIndex,
|
ConsoleInitInfo->ConsoleStartInfo->IconIndex,
|
||||||
&hIcon,
|
&hIcon,
|
||||||
&hIconSm,
|
&hIconSm,
|
||||||
1);
|
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);
|
DPRINT("hIcon = 0x%p ; hIconSm = 0x%p\n", hIcon, hIconSm);
|
||||||
if (hIcon != NULL) ConsoleInitInfo->ConsoleStartInfo->hIcon = hIcon;
|
if (hIcon != NULL) ConsoleInitInfo->ConsoleStartInfo->hIcon = hIcon;
|
||||||
if (hIconSm != NULL) ConsoleInitInfo->ConsoleStartInfo->hIconSm = hIconSm;
|
if (hIconSm != NULL) ConsoleInitInfo->ConsoleStartInfo->hIconSm = hIconSm;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue