RE: how to add control panel applet



Hi

1. create your own icon (MY_ICON) with the pb ressource editor.
2. load the icon with LoadIcon()
3. inside the CPL_NEWINQUIRE message replace the hIcon value of your
LPNEWCPLINFO struct with your icon
thats it.

for example
case CPL_NEWINQUIRE:
{
......
lpNewCplInfo->hIcon = LoadIcon (g_hInst,(LPCTSTR) MAKEINTRESOURCE(MY_ICON));
.....
}
f.e.
see http://msdn.microsoft.com/en-us/library/ms914264.aspx for an example and
replace the lpNewCplInfo->hIcon value with your loaded icon.

regards
sascha
.



Relevant Pages

  • Re: default icons not being replaced
    ... the default "little window" icon and my taskbar icon is the mfc squares ... The first parameter to LoadIcon should be AfxGetResourceHandle. ... LoadIcon does not explicitly load the small (16x16 pixel) icon. ...
    (microsoft.public.vc.mfc)
  • Missing Volume ICON and others
    ... I have heard that during the boot sequence too many programs are ... attempting to load too fast and some are missed and not loaded. ... "display icon". ... volume control icon placed on the desktop or from the volume properties ...
    (microsoft.public.windowsxp.general)
  • Volume ICON missing
    ... I have heard that during the boot sequence too many programs are ... attempting to load too fast and some are missed and not loaded. ... "display icon". ... volume control icon placed on the desktop or from the volume properties ...
    (microsoft.public.windowsxp.customize)
  • Missing Volume ICON
    ... I have heard that during the boot sequence too many programs are ... attempting to load too fast and some are missed and not loaded. ... "display icon". ... volume control icon placed on the desktop or from the volume properties ...
    (microsoft.public.windowsxp.basics)
  • Missing Volume Icon
    ... I have heard that during the boot sequence too many programs are ... attempting to load too fast and some are missed and not loaded. ... "display icon". ... volume control icon placed on the desktop or from the volume properties ...
    (microsoft.public.windowsxp.hardware)