📄 finish.cpp
字号:
/*____________________________________________________________________________
Copyright (C) 1997 Network Associates Inc. and affiliated companies.
All rights reserved.
$Id: Finish.cpp,v 1.19 1999/03/10 02:42:55 heller Exp $
____________________________________________________________________________*/
#include <windows.h>
#include "PGPadmin.h"
#include "resource.h"
#include "pgpKeys.h"
#include "pgpMem.h"
#include "PGPcl.h"
BOOL CALLBACK FinishDlgProc(HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
BOOL bReturnCode = FALSE;
pgpConfigInfo * pConfig = NULL;
g_hCurrentDlgWnd = hwndDlg;
if (uMsg != WM_INITDIALOG)
pConfig = (pgpConfigInfo *) GetWindowLong(hwndDlg, GWL_USERDATA);
switch(uMsg)
{
case WM_INITDIALOG:
{
RECT rc;
PROPSHEETPAGE *ppspConfig = (PROPSHEETPAGE *) lParam;
// center dialog on screen
GetWindowRect(GetParent(hwndDlg), &rc);
SetWindowPos(GetParent(hwndDlg), NULL,
(GetSystemMetrics(SM_CXSCREEN) - (rc.right - rc.left))/2,
(GetSystemMetrics(SM_CYSCREEN) - (rc.bottom - rc.top))/2,
0, 0, SWP_NOSIZE | SWP_NOZORDER);
pConfig = (pgpConfigInfo *) ppspConfig->lParam;
SetWindowLong(hwndDlg, GWL_USERDATA, (LPARAM) pConfig);
g_bGotReloadMsg = FALSE;
break;
}
case WM_PAINT:
if (pConfig->hPalette)
{
PAINTSTRUCT ps;
HDC hDC = BeginPaint (hwndDlg, &ps);
SelectPalette (hDC, pConfig->hPalette, FALSE);
RealizePalette (hDC);
EndPaint (hwndDlg, &ps);
bReturnCode = TRUE;
}
break;
case WM_NOTIFY:
{
LPNMHDR pnmh;
pnmh = (LPNMHDR) lParam;
switch(pnmh->code)
{
case PSN_SETACTIVE:
{
// Initialize window
SendDlgItemMessage(hwndDlg, IDC_WIZBITMAP, STM_SETIMAGE,
IMAGE_BITMAP, (LPARAM) pConfig->hBitmap);
PostMessage(GetParent(hwndDlg), PSM_SETWIZBUTTONS, 0,
PSWIZB_FINISH);
PostMessage(GetParent(hwndDlg), PSM_SETFINISHTEXT, 0,
(LPARAM) "Save");
bReturnCode = TRUE;
break;
}
case PSN_WIZFINISH:
{
pConfig->bSave = TRUE;
bReturnCode = TRUE;
break;
}
case PSN_HELP:
{
// Display help
break;
}
case PSN_QUERYCANCEL:
{
// User wants to quit
g_bGotReloadMsg = FALSE;
break;
}
}
break;
}
}
return(bReturnCode);
}
/*__Editor_settings____
Local Variables:
tab-width: 4
End:
vi: ts=4 sw=4
vim: si
_____________________*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -