阅读:2018回复:1
显示 DocumentPropertySheets 的时候要求密码检验(人民币 RMB)
我希望用户在打开 DocumentPropertySheets 的时候弹出对话框要求用户输入密码,如果密码正确显示我自定义的 TAB,
如果失败,那么就不显示。请问如何添加(可适当给点费用),下面是我的代码, 编译的时候出现错误; 1>interface.obj : error LNK2019: unresolved external symbol "public: __thiscall CPasswordDlg::CPasswordDlg(class CWnd *)" (??0CPasswordDlg@@QAE@PAVCWnd@@@Z) ref erenced in function "public: virtual long __stdcall COemUI::DocumentPropertyShee ts(struct _PROPSHEETUI_INFO *,long)" (?DocumentPropertySheets@COemUI@@UAGJPAU_PR OPSHEETUI_INFO@@J@Z) HRESULT __stdcall COemUI::DocumentPropertySheets(PPROPSHEETUI_INFO pPSUIInfo, LPARAM lParam) { ARGDUMP_BEGIN(COemUI::DocumentPropertySheets); ARGDUMP_PVOID(pPSUIInfo); ARGDUMP_DWORD_END(lParam); // psui 即 property sheet user interface DUMPOBJ(*pPSUIInfo); BOOL result = TRUE; result = result && (NULL != pPSUIInfo); result = result && (PROPSHEETUI_INFO_VERSION == pPSUIInfo->Version); if (!result) { WARNING("参数不合法。"); ::SetLastError(ERROR_INVALID_PARAMETER); } if (result) { // uip 即 user interface plug-in OEMUIPSPARAM &oem_uip_param = *(POEMUIPSPARAM)pPSUIInfo->lParamInit; HANDLE oem_heap = oem_uip_param.hOEMHeap; ASSERT(NULL != &oem_uip_param); ASSERT(NULL != oem_heap); DUMPOBJ(oem_uip_param); switch (pPSUIInfo->Reason) { case PROPSHEETUI_REASON_INIT: { //这里的 MessageBox 可以正常显示 MessageBox(NULL, L"Enter value between 11111", L"TESTING", MB_ICONWARNING | MB_OK); //但这里的就会出错: CPasswordDlg dlg(NULL); dlg.DoModal(); // 生成一个默认的属性页设置 PROPSHEETPAGE pspage_default = {0}; pspage_default.dwSize = sizeof(PROPSHEETPAGE); pspage_default.dwFlags = PSP_DEFAULT; pspage_default.hInstance = g_instance; pspage_default.pszTemplate = NULL; pspage_default.pszIcon = NULL; pspage_default.pszTitle = NULL; pspage_default.pfnDlgProc = (DLGPROC)docpage_dlgproc_default; pspage_default.lParam = (LPARAM)&m_oemui_param; // 后经WM_INITDIALOG置入属性页的DWL_USER pspage_default.pfnCallback = NULL; pspage_default.pcRefParent = NULL; pspage_default.pszHeaderTitle = NULL; pspage_default.pszHeaderSubTitle = NULL; PROPSHEETPAGE pspage; |
|
沙发#
发布于:2013-07-01 18:40
请PM我。
|
|