bool CModel::DoProperties() { bool dirty = false; { CPropertySheet* propSheet = new CPropertySheet(m_name); CModelPropPage* propPage = new CModelPropPage(); propPage->m_model = this; propPage->m_soilFlag = &dirty; propSheet->AddPage(propPage); propPage->SetRefGLAPath(GetRefGLAPath()); for (int i=0; i<PCJList_GetEntries(); i++) { propPage->AddPCJEntry(PCJList_GetEntry(i)); } propSheet->DoModal(); delete propPage; delete propSheet; } return dirty; }
bool CSetupApp::PreInstallSequence() { CPropertySheet sheet; sheet.m_psh.dwFlags&= ~PSH_HASHELP; CPageWelcome pageWelcome; CPageDestFolder pageDestFolder; CPageShortcuts pageShortcuts; CPageReady pageReady; sheet.AddPage(&pageWelcome); sheet.AddPage(&pageDestFolder); sheet.AddPage(&pageShortcuts); sheet.AddPage(&pageReady); sheet.SetWizardMode(); if (ID_WIZFINISH == sheet.DoModal()) { m_destFolder= pageDestFolder.m_destFolder; m_shortcutStartMenu= pageShortcuts.m_shortcutStartMenu; m_shortcutDesktop= pageShortcuts.m_shortcutDesktop; m_shortcutSendTo= pageShortcuts.m_shortcutSendTo; return true; } else { return false; } }
bool CSequence::DoProperties() { bool dirty = false; if (IsGLA()) { InfoBox("You can't edit the properties of a GLA file"); } else { CPropertySheet* propSheet = new CPropertySheet(m_name); CSequencePropPage* propPage = new CSequencePropPage(); propPage->m_sequence = this; propPage->m_soilFlag = &dirty; propSheet->AddPage(propPage); propSheet->DoModal(); delete propPage; delete propSheet; } return dirty; }
LRESULT CPageDesignerApp::OnSetTool(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { m_activeTool = wID; switch (wID) { case ID_TOOL_SELECT: case ID_TOOL_DIRECT: m_activeSelectionTool = wID; break; case ID_TOOL_TWIRL: case ID_TOOL_BULGE: { if (wNotifyCode == BN_DBLCLK) { CPropertySheet* sheet = new CPropertySheet("Tool", 0, GetMainHwnd()); CBrushDimensionsDlg brush; brush.m_brushSettings = this; sheet->AddPage(brush); sheet->DoModal(); } } break; } FireOnChanged(NOTIFY_MODIFY, GetUnknown(), DISPID_UNKNOWN); return 0; }
BOOL CGfxDriverUpdaterApp::InitInstance() { // InitCommonControlsEx() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinAppEx::InitInstance(); SetRegistryKey(_T("GraphicsDriverUpdater")); CPropertySheet dlg; CPage1 page1; dlg.AddPage(&page1); CPage2 page2; dlg.AddPage(&page2); dlg.SetWizardMode(); m_pMainWnd = &dlg; dlg.DoModal(); // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
void CMainFrame::OnEditDensScales () { CDensProp pageDens; CPropertySheet sheetPref (theApp.LoadString (IDS_PREFERENCES)); sheetPref.AddPage (&pageDens); sheetPref.m_psh.dwFlags |= PSH_NOAPPLYNOW; sheetPref.DoModal (); }
STEP_API void WINAPI STEPShowOptionDialog(HWND hWnd) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); CDlgSetup dlg1; CPropertySheet page; dlg1.m_bGenreListSelect = bOptGenreListSelect; page.AddPage(&dlg1); page.SetTitle(CString(STEPGetPluginName()) + " オプション設定"); if (page.DoModal() == IDOK) { bOptGenreListSelect = dlg1.m_bGenreListSelect ? true : false; WritePrivateProfileString("APE", "GenreListSelect", bOptGenreListSelect ? "1" : "0", strINI); } }
void CFPAnalysisView::OnViewWizard() { CPropertySheet ps; CHistogramPage page1; CGaussianPage page2; ps.AddPage(&page1); ps.AddPage(&page2); ps.SetWizardMode(); ps.DoModal(); }
void CSetupApp::PostInstallSequence() { CPropertySheet sheet; sheet.m_psh.dwFlags&= ~PSH_HASHELP; CPageFinished pageFinished; pageFinished.m_message= m_errorMessage; pageFinished.m_canStartApplication= m_canStartApplication; sheet.AddPage(&pageFinished); sheet.SetWizardMode(); if (ID_WIZFINISH == sheet.DoModal()) { m_startApplication= pageFinished.m_startApplication; } }
// @pymethod int|PyCPropertySheet|DoModal|Displays the property sheet as a modal dialog. PyObject *ui_propsheet_do_modal( PyObject *self, PyObject *args ) { CHECK_NO_ARGS(args); CPropertySheet *pPS; if (!(pPS=GetPropSheet(self))) return NULL; if (!PropSheetCheckForDisplay(pPS)) return NULL; Py_INCREF(self); // make sure Python doesnt kill the object while in a modal call. // really only for the common dialog(!?), and other non CPythonPropSheet's INT_PTR ret; GUI_BGN_SAVE; ret = pPS->DoModal(); GUI_END_SAVE; DODECREF(self); return PyWinObject_FromDWORD_PTR(ret); }
BOOL CDlgProperty::OnInitDialog() { CPropertyPage::OnInitDialog(); // TODO: 여기에 추가 초기화 작업을 추가합니다. CPropertySheet MySheet; CPropertyList Page1; CPropertyPreview Page2; CPropertyRGB Page3; MySheet.AddPage(&Page1); MySheet.AddPage(&Page2); MySheet.AddPage(&Page3); MySheet.DoModal(); return TRUE; // return TRUE unless you set the focus to a control // 예외: OCX 속성 페이지는 FALSE를 반환해야 합니다. }
BOOL CFileEncryptApp::InitInstance() { // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. #ifdef _DEBUG CMfxTrace::Init(); #endif g_bCreateSelfExtractFile = FALSE; CPropertySheet EncryptWizard; CEncryptWiz_1 EncryptWiz_1; CEncryptWiz_2 EncryptWiz_2; CEncryptWiz_3 EncryptWiz_3; EncryptWizard.AddPage(&EncryptWiz_1); EncryptWizard.AddPage(&EncryptWiz_2); EncryptWizard.AddPage(&EncryptWiz_3); EncryptWizard.SetWizardMode(); int nResponse = EncryptWizard.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
BOOL CNcMonDemoApp::InitInstance() { // Standard initialization #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif CPropertySheet dlg; CNcMonDemoDlg AllPage[MAX_MACH_MON_COUNT]; CString strItem; for(int i = 0; i < MAX_MACH_MON_COUNT; i++) { dlg.AddPage(&AllPage[i]); /*CTabCtrl* pTab = dlg.GetTabControl(); ASSERT (pTab); TC_ITEM ti; ti.mask = TCIF_TEXT; strcpy(ti.pszText , strItem); VERIFY (pTab->SetItem (i, &ti));*/ } m_pMainWnd = &dlg; int nResponse = dlg.DoModal(); if (nResponse == IDOK) { } else if (nResponse == IDCANCEL) { } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
LRESULT CCPApplet::OnRun(CWnd* pParentWnd) { LRESULT lResult = 1; CWnd * pWnd; InitCommonControls(); pWnd = (CWnd*) m_uiClass->CreateObject(); if ( pWnd ) { lResult = ERROR_SUCCESS; if ( pWnd->IsKindOf( RUNTIME_CLASS( CPropertySheet ) ) ) { CPropertySheet * pSheet = (CPropertySheet*) pWnd; pSheet->Construct(m_name, pParentWnd, m_pageNumber); pSheet->DoModal(); } else { check( pWnd->IsKindOf( RUNTIME_CLASS( CDialog ) ) ); CDialog * pDialog = (CDialog*) pWnd; pDialog->DoModal(); } delete pWnd; } return lResult; }
LRESULT CPageDesignerApp::OnEditPreferences(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { CPropertySheet* sheet = new CPropertySheet("Preferences", 0, GetMainHwnd()); CPrefsUnitsDlg units; CPrefsGridsDlg grids; grids.m_targetObject = this; CPrefsTransparencyDlg transp; transp.m_targetObject = this; CPrefsClipboardDlg clipboard; clipboard.m_targetObject = this; sheet->AddPage(grids); sheet->AddPage(units); sheet->AddPage(transp); sheet->AddPage(clipboard); sheet->DoModal(); return 0; }
BOOL Ctest_nomainframeApp::InitInstance() { // 如果一个运行在 Windows XP 上的应用程序清单指定要 // 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式, //则需要 InitCommonControlsEx()。否则,将无法创建窗口。 INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); // 将它设置为包括所有要在应用程序中使用的 // 公共控件类。 InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinApp::InitInstance(); ///按道理,这个COM组件的初始化放在这里应该没有问题的,但是好像因为 ///声明的_ConnectionPtr对象是全局变量,又好像因为m_pMainWnd一直没有被赋值的缘故 ///搞得非得放在CAdoConnection::CAdoConnection() 的函数体里面。 ///网上看了看,有些人的_ConnectionPtr对象是局部变量(在initialdialog函数里面调用_ConnectionPtr.InitInstance()) ///CoInitialize(NULL)就可以放到App的这个地方 /////CoInitialize(NULL); AfxEnableControlContainer(); // 创建 shell 管理器,以防对话框包含 // 任何 shell 树视图控件或 shell 列表视图控件。 CShellManager *pShellManager = new CShellManager; // 标准初始化 // 如果未使用这些功能并希望减小 // 最终可执行文件的大小,则应移除下列 // 不需要的特定初始化例程 // 更改用于存储设置的注册表项 // TODO: 应适当修改该字符串, // 例如修改为公司或组织名 SetRegistryKey(_T("应用程序向导生成的本地应用程序")); Ctest_nomainframeDlg dlg; //m_pMainWnd = &dlg; //这个是原来有的,我注释掉了 INT_PTR nResponse = dlg.DoModal(); /*if (nResponse == IDOK) { // TODO: 在此放置处理何时用 // “确定”来关闭对话框的代码 } else if (nResponse == IDCANCEL) { // TODO: 在此放置处理何时用 // “取消”来关闭对话框的代码 }*///这个if elseif 是正宗的下面那个是我改的 if (nResponse == 1)//进入登陆窗口分支 { /* CPropertySheet sheet; CDlg1 page1; CDlg2 page2; CDlg3 page3; CDlg6 page6; sheet.AddPage(&page1);//插入属性页 sheet.AddPage(&page2); sheet.AddPage(&page3); sheet.AddPage(&page6); m_pMainWnd = &sheet;//这句一定要在所有的属性页创建忘之后才写,估计是在创建完之后,才能确定这个线程分配多少内存 sheet.DoModal(); */ CUserLogin loginDlg; m_pMainWnd = &loginDlg; nResponse = loginDlg.DoModal(); } else if (nResponse == 2)//推出程序分支 { //返回2,是点击退出按钮,也是返回IDCANCLE(当然我们程序里没有),好像也是右上角X按钮的返回值 } else if(nResponse == 3)//测试用按钮分支 { CPropertySheet sheet; CDlg1 page1; CDlg2 page2; CDlg3 page3; CDlg6 page6; sheet.AddPage(&page1);//插入属性页 sheet.AddPage(&page2); sheet.AddPage(&page3); sheet.AddPage(&page6); m_pMainWnd = &sheet;//这句一定要在所有的属性页创建忘之后才写,估计是在创建完之后,才能确定这个线程分配多少内存 sheet.DoModal(); } // 删除上面创建的 shell 管理器。 if (pShellManager != NULL) { delete pShellManager; } // 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序, // 而不是启动应用程序的消息泵。 return FALSE; }
BOOL CFileDecryptApp::InitInstance() { #ifdef _DEBUG CMfxTrace::Init(); #endif if (!AfxOleInit()) return FALSE; // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. // CFileDecryptDlg dlg; // m_pMainWnd = &dlg; // int nResponse = dlg.DoModal(); #ifdef CREATE_SELF_EXTRACTING_FILE TCHAR buf[MAX_PATH]; memset(buf,0,sizeof(buf)); GetModuleFileName(NULL,buf,MAX_PATH); GetLongPathName(buf, buf, MAX_PATH); CString modulePath = buf; //memset(buf,0,sizeof(buf)); //::GetTempPath(MAX_PATH, buf); //GetLongPathName(buf, buf, MAX_PATH); //CString tempDirPath = buf; BOOL isValid = FALSE; BOOL isSelfExtractingFile = FALSE; LARGE_INTEGER address; LARGE_INTEGER size; isSelfExtractingFile = CheckIsSelfExtractingFile(modulePath, address, size, isValid); if (!isSelfExtractingFile || !isValid || modulePath.GetLength() >= MAX_PATH) { CString strText; CString strTitle; strText.LoadString(IDS_INVALID_IMAGE_FILE); strTitle.LoadString(IDS_APP_NAME); MessageBox(0, strText, strTitle, MB_OK | MB_ICONWARNING); } else { BOOL openationResult = FALSE; //CString tempFilePath = tempDirPath + modulePath.Mid(modulePath.ReverseFind(L'\\') + 1) + SELF_EXTRACTING_TEMP_EXTENSION; CString tempFilePath = modulePath + SELF_EXTRACTING_TEMP_EXTENSION; do { HANDLE hTempFile = CreateFile(tempFilePath,GENERIC_WRITE, NULL, NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_HIDDEN,NULL); SetFileAttributes(tempFilePath, FILE_ATTRIBUTE_HIDDEN); if (hTempFile == INVALID_HANDLE_VALUE) { break; } HANDLE hModule = CreateFile(modulePath, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (hModule == INVALID_HANDLE_VALUE) { break; } if (!SetFilePointerEx(hModule, address, 0, FILE_BEGIN)) { break; } char chBuf[1024]; ZeroMemory(chBuf, sizeof(chBuf)); DWORD dwRead = 0; DWORD dwWrite = 0; LARGE_INTEGER remainToRead; remainToRead.QuadPart = size.QuadPart; LARGE_INTEGER totalRead; totalRead.QuadPart = 0; DWORD dwToRead = 0; if (remainToRead.QuadPart > sizeof(chBuf)) { dwToRead = sizeof(chBuf); } else { dwToRead = remainToRead.QuadPart; } while (dwToRead != 0 && ReadFile(hModule, chBuf, dwToRead, &dwRead, 0) && dwToRead == dwRead){ totalRead.QuadPart += dwRead; remainToRead.QuadPart -= dwRead; if (WriteFile(hTempFile, chBuf, dwToRead, &dwWrite, 0) && dwWrite == dwToRead) { if (remainToRead.QuadPart > sizeof(chBuf)) { dwToRead = sizeof(chBuf); } else { dwToRead = remainToRead.QuadPart; } dwRead = dwWrite = 0; ZeroMemory(chBuf, sizeof(chBuf)); } else { break; } } if (dwToRead == 0) { openationResult = TRUE; } CloseHandle(hTempFile); CloseHandle(hModule); } while (0); if (!openationResult) { CString strText; CString strTitle; strText.LoadString(IDS_INVALID_IMAGE_FILE); strTitle.LoadString(IDS_APP_NAME); MessageBox(0, strText, strTitle, MB_OK | MB_ICONWARNING); return FALSE; } g_isSelfExtractingFile = TRUE; wcsncpy(g_DecryptInfo.szImageFile,(LPCTSTR)tempFilePath,MAX_PATH-1); CPropertySheet DecryptWizard; CDecryptWiz_2 DecryptWiz_2; CDecryptWiz_3 DecryptWiz_3; CDecryptWiz_4 DecryptWiz_4; CDecryptWiz_5 DecryptWiz_5; DecryptWizard.AddPage(&DecryptWiz_2); DecryptWizard.AddPage(&DecryptWiz_3); DecryptWizard.AddPage(&DecryptWiz_4); DecryptWizard.AddPage(&DecryptWiz_5); DecryptWizard.SetWizardMode(); DecryptWizard.DoModal(); DeleteFile(tempFilePath); } #else CPropertySheet DecryptWizard; CDecryptWiz_1 DecryptWiz_1; CDecryptWiz_2 DecryptWiz_2; CDecryptWiz_3 DecryptWiz_3; CDecryptWiz_4 DecryptWiz_4; CDecryptWiz_5 DecryptWiz_5; DecryptWizard.AddPage(&DecryptWiz_1); DecryptWizard.AddPage(&DecryptWiz_2); DecryptWizard.AddPage(&DecryptWiz_3); DecryptWizard.AddPage(&DecryptWiz_4); DecryptWizard.AddPage(&DecryptWiz_5); DecryptWizard.SetWizardMode(); DecryptWizard.DoModal(); #endif // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
LRESULT CLXWebSiteApp::OnFileNewSite(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { // USES_CONVERSION; CComPtr<ILXFrameworkFrame> lxframe; m_spAddinSite->GetFrame(&lxframe); CComQIPtr<IUIWnd> wnd = lxframe; HWND hWnd; wnd->get_hwnd(&hWnd); if (TRUE) { CPropertySheet* sheet = new CPropertySheet("New Site", 0, hWnd); // sheet->SetWizardMode(); // sheet->m_psh.dwFlags |= PSH_WIZARD97; sheet->SetWatermark(MAKEINTRESOURCE(IDB_NEWSITE_WATERMARK)); CNewSiteData data; CNewSiteBeginDlg begindlg; begindlg.m_psp.dwFlags |= PSP_HIDEHEADER; begindlg.SetHeaderTitle("LocalSite"); CNewSiteFinishDlg finishdlg; finishdlg.m_psp.dwFlags |= PSP_HIDEHEADER; finishdlg.SetHeaderTitle("LocalSite"); CNewSiteSingleWorkgroupDlg singleworkdlg; singleworkdlg.m_data = &data; singleworkdlg.m_nWorkgroup = 0; singleworkdlg.SetHeaderTitle("SingleWorkgroup"); CNewSiteLocalSiteOptionsDlg localsitedlg; localsitedlg.m_data = &data; localsitedlg.m_nLocalSite = 0; localsitedlg.SetHeaderTitle("LocalSite"); CNewSiteLocalNameDlg localnamedlg; localnamedlg.m_data = &data; localnamedlg.SetHeaderTitle("LocalName"); CNewSiteFTPDlg ftpdlg; ftpdlg.m_data = &data; ftpdlg.SetHeaderTitle("FTP"); CNewSiteWorkgroupOptionsDlg workoptionsdlg; workoptionsdlg.m_data = &data; workoptionsdlg.SetHeaderTitle("FTP"); CNewSiteWorkgroupLogonDlg worklogondlg; worklogondlg.m_data = &data; worklogondlg.m_server = L"213.115.5.39"; worklogondlg.m_username = L"Sigurd"; worklogondlg.m_password = L"testing"; worklogondlg.SetHeaderTitle("Workgroup Logon"); sheet->AddPage(begindlg); sheet->AddPage(singleworkdlg); sheet->AddPage(localsitedlg); sheet->AddPage(localnamedlg); sheet->AddPage(ftpdlg); sheet->AddPage(finishdlg); sheet->AddPage(workoptionsdlg); sheet->AddPage(worklogondlg); sheet->DoModal(); if (singleworkdlg.m_nWorkgroup == 0) { if (localnamedlg.m_localSitePath.GetLength() && localnamedlg.m_siteName.GetLength()) { CComObject<CWebSite>* pWebSite; CComObject<CWebSite>::CreateInstance(&pWebSite); if (pWebSite) { pWebSite->AddRef(); pWebSite->SetApp(this); HRESULT hr = pWebSite->m_webSite.CoCreateInstance(CLSID_LXLocalWebSite); if (SUCCEEDED(hr)) { HRESULT hr = pWebSite->m_webSite->NewDocument(A2BSTR(localnamedlg.m_localSitePath), A2BSTR(localnamedlg.m_siteName)); if (SUCCEEDED(hr)) { CComQIPtr<IEFrame> eframe = lxframe; pWebSite->ShowViews(eframe); return 0; } else { // TODO, use IErrorInfo etc MessageBox(hWnd, "Failed to create Local WebSite", "LXWebSite", MB_OK); } } pWebSite->Release(); } } } else if (singleworkdlg.m_nWorkgroup == 1) { #if 0 COAUTHIDENTITY cauthid; cauthid.User = worklogondlg.m_username; cauthid.UserLength = worklogondlg.m_username.length(); cauthid.Domain = L"WORKGROUP"; cauthid.DomainLength = wcslen(cauthid.Domain); cauthid.Password = worklogondlg.m_password; cauthid.PasswordLength = worklogondlg.m_password.length(); cauthid.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE; COAUTHINFO cauthi; cauthi.dwAuthnSvc = RPC_C_AUTHN_WINNT; cauthi.dwAuthzSvc = RPC_C_AUTHZ_NONE; cauthi.pwszServerPrincName = NULL; cauthi.dwAuthnLevel = RPC_C_AUTHN_LEVEL_CONNECT; cauthi.dwImpersonationLevel = RPC_C_IMP_LEVEL_IMPERSONATE; cauthi.pAuthIdentityData = &cauthid; cauthi.dwCapabilities = EOAC_NONE; COSERVERINFO csi; csi.dwReserved1 = 0; csi.pwszName = worklogondlg.m_server; csi.pAuthInfo = &cauthi; csi.dwReserved2 = 0; MULTI_QI qi; qi.pIID = &XMILLWEBLib::IID_IXmillWebSite; qi.pItf = NULL; qi.hr = 0; HRESULT hr = CoCreateInstanceEx(XMILLWEBLib::CLSID_XmillWebSite, NULL, CLSCTX_SERVER/*CLSCTX_ALL*/, &csi, 1, &qi); if (SUCCEEDED(qi.hr)) { XMILLWEBLib::IXmillWebSitePtr webSite;//(L"XMillWeb.WebSite"); CComQIPtr<IClientSecurity> csec = qi.pItf; hr = CoSetProxyBlanket(qi.pItf, cauthi.dwAuthnSvc, cauthi.dwAuthzSvc, cauthi.pwszServerPrincName, cauthi.dwAuthnLevel, cauthi.dwImpersonationLevel, cauthi.pAuthIdentityData, cauthi.dwCapabilities); webSite = qi.pItf; qi.pItf->Release(); try { CComPtr<ILDOMDocument> document; document.CoCreateInstance(CLSID_LDOMDocument); VARIANT_BOOL bsuccess; document->loadXML(L"<website/>", &bsuccess); CComPtr<ILDOMElement> documentElement; document->get_documentElement(&documentElement); documentElement->setAttribute(L"name", L"TestSite1"); BSTR bxml; document->saveXML(NULL, &bxml); _bstr_t xml = _bstr_t(bxml, false); long websiteID = webSite->NewWebSite(xml); } catch (_com_error &e) { ComError(e); } } #endif } } return 0; }
BOOL ShowApplet(HWND hWnd, LONG_PTR /*lData*/, LPCTSTR pstrCommand) { BOOL bWithFingerMenu = FALSE; CString szPath; CString szProgramFilesFolder; WCHAR szInstallDir[MAX_PATH]; WCHAR szValue[MAX_PATH]; ZeroMemory(szValue, sizeof(szValue)); if (SHGetSpecialFolderPath(NULL, szValue, CSIDL_PROGRAM_FILES, FALSE)) { szProgramFilesFolder.Format(L"%s", szValue); } if (RegistryGetString(HKEY_LOCAL_MACHINE, L"Software\\FingerMenu", L"InstallDir", szInstallDir, MAX_PATH) == S_OK) { szPath.Format(L"%s\\FingerMenu.exe", szInstallDir); } else { szPath = szProgramFilesFolder + L"\\FingerMenu\\FingerMenu.exe"; } CFindFile finder; if (finder.FindFile(szPath)) { bWithFingerMenu = TRUE; } dlg1.SetTitle(L"Startup"); dlg1.m_bWithFingerMenu = bWithFingerMenu; if (bWithFingerMenu) { dlg2.SetTitle(L"Menu options"); dlg3.SetTitle(L"Menu exclusions"); dlg7.SetTitle(L"Menu wnd exclusions"); } dlg5.SetTitle(L"Msgbox options"); dlg6.SetTitle(L"Msgbox exclusions"); dlg8.SetTitle(L"Msgbox wnd exclusions"); dlg4.SetTitle(L"Skins"); dlg4.m_bWithFingerMenu = bWithFingerMenu; dlgAbout.SetTitle(L"About"); // about box CString strCredits = "\n\n" "\tFingerMenu v1.12\n\n" "\tFingerMsgBox v1.01\n\n" "\rdeveloped by:\n" "Francesco Carlucci\n" "<*****@*****.**>\n" "\n\n" "http://forum.xda-developers.com/\n" " showthread.php?t=459125\n"; dlgAbout.SetCredits(strCredits); CPropertySheet sheet; sheet.AddPage(dlg1); if (bWithFingerMenu) { sheet.AddPage(dlg2); sheet.AddPage(dlg3); sheet.AddPage(dlg7); } sheet.AddPage(dlg5); sheet.AddPage(dlg6); sheet.AddPage(dlg8); sheet.AddPage(dlg4); sheet.AddPage(dlgAbout); sheet.SetActivePage(_ttol(pstrCommand)); if (IDOK == sheet.DoModal(hWnd)) { ReloadConfiguration(); } return TRUE; }