19,504
社区成员
发帖
与我相关
我的任务
分享
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.
{
ASSERT(0 == lParam1);
ASSERT(lParam2);
NEWCPLINFO* lpNewCplInfo = (NEWCPLINFO *) lParam2;
NKDbgPrintfW( (TEXT("HelloCPL:11111111111\r\n")));
if (lpNewCplInfo)
{
lpNewCplInfo->dwSize = sizeof(NEWCPLINFO);
lpNewCplInfo->dwFlags = 0;
lpNewCplInfo->dwHelpContext = 0;
lpNewCplInfo->lData = IDI_HelloWorld;
// The large icon for this application. Do not free this
// HICON; it is freed by the Control Panel infrastructure.
NKDbgPrintfW( (TEXT("HelloCPL:LoadIcon g_hModule %X\r\n")), g_hModule);
lpNewCplInfo->hIcon = LoadIcon(g_hModule, MAKEINTRESOURCE(IDI_HelloWorld));
NKDbgPrintfW( (TEXT("HelloCPL:LoadIcon %X\r\n")), lpNewCplInfo->hIcon);
int i = LoadString(g_hModule, IDS_APP_TITLE, lpNewCplInfo->szName, lengthof(lpNewCplInfo->szName));
NKDbgPrintfW( (TEXT("HelloCPL:LoadString %d\r\n")), i);
LoadString(g_hModule, IDC_HelloWorld, lpNewCplInfo->szInfo, lengthof(lpNewCplInfo->szInfo));
NKDbgPrintfW( (TEXT("HelloCPL:LoadString\r\n")));
_tcscpy(lpNewCplInfo->szHelpFile, _T(""));
return 0;
}
return 1; // Nonzero value means CPlApplet failed.
}
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;