home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 February
/
Chip_2002-02_cd1.bin
/
sharewar
/
apaths
/
APSOURCE.ZIP
/
CPlApplet.c
< prev
next >
Wrap
C/C++ Source or Header
|
2001-03-26
|
2KB
|
78 lines
/* CPlApplet.c - March 26th, 2001
**
** Copyright (c) 1997-2001 by Gregory Braun. All rights reserved.
**
** This function forms the main entry point for an MS Windows 95/NT
** Control Panel applet. This routine is called by Control.exe when
** first launched.
**
** Called: w = window handle of the parent.
** msg = MS Windows CPL messages.
** wp = WPARAM argument.
** lp = LPARAM argument.
**
** Returns: Results based upon the message being processed.
**
** Notes: This is an exported API function.
*/
#include "AppPaths.h"
static void inquire (HINSTANCE module,LPNEWCPLINFO info);
LONG CALLBACK CPlApplet (HWND w,UINT msg,LONG wp,LONG lp)
{
UNUSED_ARG (wp);
switch (msg) {
case CPL_INIT :
return (TRUE);
break;
case CPL_GETCOUNT :
return (1);
break;
case CPL_NEWINQUIRE :
inquire (applet,(LPNEWCPLINFO) lp);
break;
case CPL_DBLCLK :
Property (w);
break;
case CPL_STOP :
break;
case CPL_EXIT :
break;
default :
break;
}
return (FALSE);
}
static void inquire (HINSTANCE module,LPNEWCPLINFO info)
{
info->dwSize = sizeof (NEWCPLINFO);
info->dwFlags = NIL;
info->dwHelpContext = NIL;
info->lData = NIL;
info->hIcon = LoadIcon (module,(LPCTSTR) APPLICATION_ICON);
if (*helpfile)
lstrcpy (info->szHelpFile,helpfile);
else
*info->szHelpFile = EOS;
LoadString (module,CPANEL_NAME,info->szName,32);
LoadString (module,CPANEL_DESC,info->szInfo,64);
return;
}
/* end of CPlApplet.c - written by Gregory Braun */