// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// The entry point to the Control Panel application.
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
extern "C" LONG CALLBACK CPlApplet(HWND hwndCPL,UINT message, LPARAM lParam1, LPARAM lParam2)
{
switch (message)
{
case CPL_INIT:
// Perform global initializations, especially memory
// allocations, here.
// Return 1 for success or 0 for failure.
// Control Panel does not load if failure is returned.
return 1;
case CPL_GETCOUNT:
// The number of actions supported by this Control
// Panel application.
return 1;
case CPL_NEWINQUIRE:
{
// This message is sent once for each dialog box, as
// determined by the value returned from CPL_GETCOUNT.
// lParam1 is the 0-based index of the dialog box.
// lParam2 is a pointer to the NEWCPLINFO structure.
return 0; //means CPLApplet succeed
return 1; // Nonzero value means CPlApplet failed.
}
case CPL_DBLCLK:
{
// The user has double-clicked the icon for the
// dialog box in lParam1 (zero-based).
return 0; // CPlApplet succeed.
return 1; // CPlApplet failed.
}
case CPL_STOP:
// Called once for each dialog box. Used for cleanup.
case CPL_EXIT:
// Called only once for the application. Used for cleanup.