Extra large (256x256) icon shortcut to the control panel applet (CPL) ?
-
We have the extra large icon view (256 x 256) since Windows Vista. Now I have a control panel applet running under Win7 and Vista. I have added the icon resources with images of size 256 x 256 into the CPL. But the shortcut (on the Desktop) to this CPL applet does not display the icon correctly. It is said that assigning the value
CPL_DYNAMIC_RES
for theidIcon
member ofCPLINFO
structure in theCPL_INQUIRE
message handler triggers Windows to send aCPL_NEWINQUIRE
message. And then we assign thehIcon
member ofNEWCPLINFO
in theCPL_NEWINQUIRE
message handler for the icon information. But no matterAfxGetApp()->LoadIcon
or::LoadImage
(even with theLR_DEFAULTSIZE
flag) fails to make the icon image of the shortcut on the Desktop display the correct sized image. Does anyone know the correct way to handle theCPL_INQUIRE
andCPL_NEWINQUIRE
to make it display 256 x 256 image for the shortcut on the Desktop? Thanks in advance.Maxwell Chen
-
We have the extra large icon view (256 x 256) since Windows Vista. Now I have a control panel applet running under Win7 and Vista. I have added the icon resources with images of size 256 x 256 into the CPL. But the shortcut (on the Desktop) to this CPL applet does not display the icon correctly. It is said that assigning the value
CPL_DYNAMIC_RES
for theidIcon
member ofCPLINFO
structure in theCPL_INQUIRE
message handler triggers Windows to send aCPL_NEWINQUIRE
message. And then we assign thehIcon
member ofNEWCPLINFO
in theCPL_NEWINQUIRE
message handler for the icon information. But no matterAfxGetApp()->LoadIcon
or::LoadImage
(even with theLR_DEFAULTSIZE
flag) fails to make the icon image of the shortcut on the Desktop display the correct sized image. Does anyone know the correct way to handle theCPL_INQUIRE
andCPL_NEWINQUIRE
to make it display 256 x 256 image for the shortcut on the Desktop? Thanks in advance.Maxwell Chen
The root cause is in the ico file. Do not use PNG (do not compress) for the 256 x 256 and 128 x 128 frames. Use BMP (uncompressed) instead. And the issue is resolved.
Maxwell Chen