BOOL CPPgDirectories::OnInitDialog() { CWaitCursor curWait; // initialization of that dialog may take a while.. CPropertyPage::OnInitDialog(); InitWindowStyles(this); ((CEdit*)GetDlgItem(IDC_INCFILES))->SetLimitText(MAX_PATH); AddBuddyButton(GetDlgItem(IDC_INCFILES)->m_hWnd, ::GetDlgItem(m_hWnd, IDC_SELINCDIR)); InitAttachedBrowseButton(::GetDlgItem(m_hWnd, IDC_SELINCDIR), m_icoBrowse); AddBuddyButton(GetDlgItem(IDC_TEMPFILES)->m_hWnd, ::GetDlgItem(m_hWnd, IDC_SELTEMPDIR)); InitAttachedBrowseButton(::GetDlgItem(m_hWnd, IDC_SELTEMPDIR), m_icoBrowse); m_ctlUncPaths.InsertColumn(0, GetResString(IDS_UNCFOLDERS), LVCFMT_LEFT, 280); m_ctlUncPaths.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); GetDlgItem(IDC_SELTEMPDIRADD)->ShowWindow(thePrefs.IsExtControlsEnabled()?SW_SHOW:SW_HIDE); LoadSettings(); Localize(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CPPgWebServer::OnInitDialog() { CPropertyPage::OnInitDialog(); InitWindowStyles(this); AddBuddyButton(GetDlgItem(IDC_TMPLPATH)->m_hWnd, ::GetDlgItem(m_hWnd, IDC_TMPLBROWSE)); InitAttachedBrowseButton(::GetDlgItem(m_hWnd, IDC_TMPLBROWSE), m_icoBrowse); ((CEdit*)GetDlgItem(IDC_WSPASS))->SetLimitText(12); ((CEdit*)GetDlgItem(IDC_WSPORT))->SetLimitText(6); LoadSettings(); InitTooltips(); // MORPH leuk_he tooltipped Localize(); OnEnChangeWSEnabled(); // note: there are better classes to create a pure hyperlink, however since it is only needed here // we rather use an already existing class CRect rect; GetDlgItem(IDC_GUIDELINK)->GetWindowRect(rect); ::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rect, 2); m_wndMobileLink.CreateEx(NULL,0,_T("MsgWnd"),WS_BORDER | WS_VISIBLE | WS_CHILD | HTC_WORDWRAP | HTC_UNDERLINE_HOVER,rect.left,rect.top,rect.Width(),rect.Height(),m_hWnd,0); m_wndMobileLink.SetBkColor(::GetSysColor(COLOR_3DFACE)); // still not the right color, will fix this later (need to merge the .rc file before it changes ;) ) m_wndMobileLink.SetFont(GetFont()); if (!bCreated){ bCreated = true; m_wndMobileLink.AppendText(_T("Link: ")); m_wndMobileLink.AppendHyperLink(GetResString(IDS_MMGUIDELINK),0,CString(_T("http://mobil.emule-project.net")),0,0); } return TRUE; }
BOOL CPPgFiles::OnInitDialog() { CPropertyPage::OnInitDialog(); InitWindowStyles(this); AddBuddyButton(GetDlgItem(IDC_VIDEOPLAYER)->m_hWnd, ::GetDlgItem(m_hWnd, IDC_BROWSEV)); InitAttachedBrowseButton(::GetDlgItem(m_hWnd, IDC_BROWSEV), m_icoBrowse); LoadSettings(); Localize(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CPPgNotify::OnInitDialog() { #if _ATL_VER >= 0x0710 m_bEnableEMail = (IsRunningXPSP2OrHigher() > 0); #endif CPropertyPage::OnInitDialog(); InitWindowStyles(this); AddBuddyButton(GetDlgItem(IDC_EDIT_TBN_WAVFILE)->m_hWnd, ::GetDlgItem(m_hWnd, IDC_BTN_BROWSE_WAV)); InitAttachedBrowseButton(::GetDlgItem(m_hWnd, IDC_BTN_BROWSE_WAV), m_icoBrowse); int iBtnID; if (thePrefs.notifierSoundType == ntfstSoundFile) iBtnID = IDC_CB_TBN_USESOUND; else if (thePrefs.notifierSoundType == ntfstSpeech) iBtnID = IDC_CB_TBN_USESPEECH; else { ASSERT( thePrefs.notifierSoundType == ntfstNoSound ); iBtnID = IDC_CB_TBN_NOSOUND; } ASSERT( IDC_CB_TBN_NOSOUND < IDC_CB_TBN_USESOUND && IDC_CB_TBN_USESOUND < IDC_CB_TBN_USESPEECH ); CheckRadioButton(IDC_CB_TBN_NOSOUND, IDC_CB_TBN_USESPEECH, iBtnID); CheckDlgButton(IDC_CB_TBN_ONDOWNLOAD, thePrefs.notifierOnDownloadFinished ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CB_TBN_ONNEWDOWNLOAD, thePrefs.notifierOnNewDownload ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CB_TBN_ONCHAT, thePrefs.notifierOnChat ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CB_TBN_ONLOG, thePrefs.notifierOnLog ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CB_TBN_IMPORTATNT, thePrefs.notifierOnImportantError ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CB_TBN_POP_ALWAYS, thePrefs.notifierOnEveryChatMsg ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CB_TBN_ONNEWVERSION, thePrefs.notifierOnNewVersion ? BST_CHECKED : BST_UNCHECKED); CButton* btnPTR = (CButton*)GetDlgItem(IDC_CB_TBN_POP_ALWAYS); btnPTR->EnableWindow(IsDlgButtonChecked(IDC_CB_TBN_ONCHAT)); SetDlgItemText(IDC_EDIT_TBN_WAVFILE, thePrefs.notifierSoundFile); if (!m_bEnableEMail){ CheckDlgButton(IDC_CB_ENABLENOTIFICATIONS, BST_UNCHECKED); GetDlgItem(IDC_EMAILNOT_GROUP)->EnableWindow(FALSE); GetDlgItem(IDC_CB_ENABLENOTIFICATIONS)->EnableWindow(FALSE); GetDlgItem(IDC_TXT_SMTPSERVER)->EnableWindow(FALSE); GetDlgItem(IDC_TXT_RECEIVER)->EnableWindow(FALSE); GetDlgItem(IDC_TXT_SENDER)->EnableWindow(FALSE); GetDlgItem(IDC_EDIT_SMTPSERVER)->EnableWindow(FALSE); GetDlgItem(IDC_EDIT_RECEIVER)->EnableWindow(FALSE); GetDlgItem(IDC_EDIT_SENDER)->EnableWindow(FALSE); } else{ SetDlgItemText(IDC_EDIT_SMTPSERVER, thePrefs.GetNotifierMailServer()); SetDlgItemText(IDC_EDIT_RECEIVER, thePrefs.GetNotifierMailReceiver()); SetDlgItemText(IDC_EDIT_SENDER, thePrefs.GetNotifierMailSender()); if (thePrefs.IsNotifierSendMailEnabled()){ CheckDlgButton(IDC_CB_ENABLENOTIFICATIONS, BST_CHECKED); GetDlgItem(IDC_EDIT_SMTPSERVER)->EnableWindow(TRUE); GetDlgItem(IDC_EDIT_RECEIVER)->EnableWindow(TRUE); GetDlgItem(IDC_EDIT_SENDER)->EnableWindow(TRUE); } else{ CheckDlgButton(IDC_CB_ENABLENOTIFICATIONS, BST_UNCHECKED); GetDlgItem(IDC_EDIT_SMTPSERVER)->EnableWindow(FALSE); GetDlgItem(IDC_EDIT_RECEIVER)->EnableWindow(FALSE); GetDlgItem(IDC_EDIT_SENDER)->EnableWindow(FALSE); } } UpdateControls(); Localize(); GetDlgItem(IDC_CB_TBN_USESPEECH)->EnableWindow(IsSpeechEngineAvailable()); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }