BOOL CDlgFeedConfig::OnInitDialog() { CDialog::OnInitDialog(); // TODO: 在此添加额外的初始化 EnableToolTips(TRUE); GetDlgItem(IDC_EDIT_RW_FEED_NAME)->ShowWindow(SW_HIDE); GetDlgItem(IDC_EDIT_RW_SAVE_DIR)->ShowWindow(SW_HIDE); if ( CWnd *pWndSaveDir = GetDlgItem(IDC_STATIC_RW_SHOW_SAVE_DIR) ) { if ( CFont * pFont = pWndSaveDir->GetFont() ) { LOGFONT logfont; pFont->GetLogFont(&logfont); logfont.lfUnderline = TRUE; m_pFontSaveDir = new CFont(); m_pFontSaveDir->CreateFontIndirect(&logfont); pWndSaveDir->SetFont(m_pFontSaveDir); } } // 更新ui上的feed信息 UpdateFeedInfo(); // 本地化 Localize(); return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE }
BOOL CToolAssocDlg::OnInitDialog() { CDialog::OnInitDialog(); EnableToolTips(); m_tooltips.Create(this); CString title; if (m_sType == _T("Diff")) { title.LoadString(m_bAdd ? IDS_DLGTITLE_ADD_DIFF_TOOL : IDS_DLGTITLE_EDIT_DIFF_TOOL); m_tooltips.AddTool(IDC_TOOLEDIT, IDS_SETTINGS_EXTDIFF_TT); } else { title.LoadString(m_bAdd ? IDS_DLGTITLE_ADD_MERGE_TOOL : IDS_DLGTITLE_EDIT_MERGE_TOOL); m_tooltips.AddTool(IDC_TOOLEDIT, IDS_SETTINGS_EXTMERGE_TT); } SetWindowText(title); SHAutoComplete(::GetDlgItem(m_hWnd, IDC_TOOLEDIT), SHACF_FILESYSTEM | SHACF_FILESYS_ONLY); UpdateData(FALSE); return TRUE; }
BOOL COptionTab7::OnInitDialog() { CPropertyPage::OnInitDialog(); EnableToolTips(true); // TOOL TIPS // mode modif à la volée if (modify==1) { GetDlgItem(IDC_ADD1) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ADD2) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_URL2) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_STATIC_finfo) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_STATIC_tip) ->ModifyStyle(0,WS_DISABLED); } else { GetDlgItem(IDC_ADD1) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ADD2) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_URL2) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_STATIC_finfo) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_STATIC_tip) ->ModifyStyle(WS_DISABLED,0); } // Patcher l'interface pour les Français ;-) if (LANG_T(-1)) { // Patcher en français SetWindowTextCP(this, LANG(LANG_B9)); // "Filtres"); SetDlgItemTextCP(this, IDC_STATIC_finfo,LANG(LANG_B10)); // "Vous pouvez exclure ou accepter plusieurs URLs ou liens, en utilisant les jokers\nVous pouvez utiliser les virgules ou les espaces entre les filtres\nExemple: +*.zip,-www.*.com,-www.*.edu/cgi-bin/*.cgi"); SetDlgItemTextCP(this, IDC_ADD1,LANG(LANG_B11)); // "Exclure lien(s).."); SetDlgItemTextCP(this, IDC_ADD2,LANG(LANG_B12)); // "Accepter lien(s).."); SetDlgItemTextCP(this, IDC_STATIC_tip,LANG(LANG_B13)); // "Conseil: Si vous voulez accepter tous les fichiers gif d'un site, utilisez quelque chose comme +www.monweb.com/*.gif\n(+*.gif autorisera TOUS les fichiers gif sur TOUS les sites)"); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CLeftView::OnInitialUpdate() { CListView::OnInitialUpdate(); CFoulerDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); pDoc->SetLeftView( this ); CListCtrl& refCtrl = GetListCtrl(); EnableToolTips(TRUE); m_ImageList.Create(MAKEINTRESOURCE(IDB_ICONS), 15, 1, RGB(255,255,255)); refCtrl.SetImageList(&m_ImageList, LVSIL_SMALL); char cStr[256]; ZeroMemory( cStr, sizeof(cStr) ); LV_COLUMN lvc; lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVS_SHOWSELALWAYS; lvc.fmt = LVCFMT_RIGHT; lvc.iImage = 0; wsprintf( cStr, "Trial" ); lvc.pszText = cStr; lvc.cx = 60; refCtrl.InsertColumn(0, &lvc); wsprintf( cStr, "Value" ); lvc.pszText = cStr; lvc.cx = 80; refCtrl.InsertColumn(1, &lvc); }
/* ================ DialogAF::OnInitDialog ================ */ BOOL DialogAF::OnInitDialog() { CDialog::OnInitDialog(); com_editors |= EDITOR_AF; // initialize list with articulated figure files InitAFList(); // initialize tabs wndTabs = ( CTabCtrl * ) GetDlgItem( IDC_DIALOG_AF_TAB_MODE ); AddTabItem( AFTAB_VIEW, "View" ); AddTabItem( AFTAB_PROPERTIES, "Properties" ); AddTabItem( AFTAB_BODIES, "Bodies" ); AddTabItem( AFTAB_CONSTRAINTS, "Constraints" ); SetTab( AFTAB_VIEW ); // create child dialog windows viewDlg = new DialogAFView( this ); propertiesDlg = new DialogAFProperties( this ); bodyDlg = new DialogAFBody( this ); constraintDlg = new DialogAFConstraint( this ); // the body dialog may force the constraint dialog to reload the file bodyDlg->constraintDlg = constraintDlg; // the properties dialog may force the body or constraint dialog to reload the file propertiesDlg->bodyDlg = bodyDlg; propertiesDlg->constraintDlg = constraintDlg; // set active child dialog wndTabDisplay = viewDlg; SetTabChildPos(); EnableToolTips( TRUE ); GetDlgItem( IDC_BUTTON_AF_DELETE )->EnableWindow( false ); GetDlgItem( IDC_BUTTON_AF_SAVE )->EnableWindow( false ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CAboutDlg::OnInitDialog() { CString aboutString; #ifdef WIP aboutString.Format(_T("FamiTracker version %i.%i.%i beta %i"), VERSION_MAJ, VERSION_MIN, VERSION_REV, VERSION_WIP); #else CString str; str.Format(_T("%i.%i.%i"), VERSION_MAJ, VERSION_MIN, VERSION_REV); AfxFormatString1(aboutString, IDS_ABOUT_VERSION_FORMAT, str); #endif SetDlgItemText(IDC_ABOUT1, aboutString); m_pMail = new CLinkLabel(LINK_MAIL); m_pWeb = new CLinkLabel(LINK_WEB); m_pMail->SubclassDlgItem(IDC_MAIL, this); m_pWeb->SubclassDlgItem(IDC_WEBPAGE, this); m_pHead = new CHead(); m_pHead->SubclassDlgItem(IDC_HEAD, this); LOGFONT LogFont; CFont *pFont; EnableToolTips(TRUE); m_wndToolTip.Create(this, TTS_ALWAYSTIP); m_wndToolTip.Activate(TRUE); m_wndToolTip.AddTool(m_pMail, IDS_ABOUT_TOOLTIP_MAIL); m_wndToolTip.AddTool(m_pWeb, IDS_ABOUT_TOOLTIP_WEB); pFont = m_pMail->GetFont(); pFont->GetLogFont(&LogFont); LogFont.lfUnderline = 1; m_pLinkFont = new CFont(); m_pLinkFont->CreateFontIndirect(&LogFont); m_pMail->SetFont(m_pLinkFont); m_pWeb->SetFont(m_pLinkFont); CStatic *pStatic = static_cast<CStatic*>(GetDlgItem(IDC_ABOUT1)); CFont *pOldFont = pStatic->GetFont(); LOGFONT NewLogFont; pOldFont->GetLogFont(&NewLogFont); NewLogFont.lfWeight = FW_BOLD; m_pBoldFont = new CFont(); m_pTitleFont = new CFont(); m_pBoldFont->CreateFontIndirect(&NewLogFont); NewLogFont.lfHeight = 18; // NewLogFont.lfUnderline = TRUE; m_pTitleFont->CreateFontIndirect(&NewLogFont); static_cast<CStatic*>(GetDlgItem(IDC_ABOUT1))->SetFont(m_pTitleFont); static_cast<CStatic*>(GetDlgItem(IDC_ABOUT2))->SetFont(m_pBoldFont); static_cast<CStatic*>(GetDlgItem(IDC_ABOUT3))->SetFont(m_pBoldFont); return TRUE; }
BOOL Ctrans::OnInitDialog() { CPropertyPage::OnInitDialog(); ((CButton*)GetDlgItem(IDC_select_start))->SetCheck(1); strcpybuff(RasString,""); SetIcon(httrack_icon,false); SetIcon(httrack_icon,true); EnableToolTips(true); // TOOL TIPS // Patcher l'interface pour les Français ;-) if (LANG_T(-1)) { // Patcher en français //SetDlgItemTextCP(this, ,""); SetWindowTextCP(this, LANG(LANG_J9) /*"Démarrer.."*/); SetDlgItemTextCP(this, IDC_select_start,LANG(LANG_J10) /*"Vous pouvez démarrer le miroir en pressant la touche DEMARRER,\nou définir avant les options de connexion"*/); SetDlgItemTextCP(this, IDC_select_save,LANG(LANG_J10b)); SetDlgItemTextCP(this, IDC_STATIC_delay,LANG(LANG_J11) /*"Retarder"*/); SetDlgItemTextCP(this, IDC_wait,LANG(LANG_J12) /*"Attendre avant de commencer jusqu'à: (hh/mm/ss)"*/); //SetDlgItemTextCP(this, IDC_avant,LANG(LANG_BACK) /*"<- AVANT"*/); SetDlgItemTextCP(this, IDCANCEL,LANG(LANG_QUIT) /*"Quitter"*/); SetDlgItemTextCP(this, IDOK,LANG(LANG_J13) /*"DEMARRER!"*/); SetDlgItemTextCP(this, IDC_STATIC_ras,LANG(LANG_J14) /*"Connexion provider"*/); SetDlgItemTextCP(this, IDC_cnx,LANG(LANG_J15) /*"Connecter à ce provider"*/); SetDlgItemTextCP(this, IDC_rasdisc,LANG_J16); } // liste vide pour commencer isfilled=FALSE; FillProviderList(0); m_ctlrasid.SetCurSel(0); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CMultiMix::Create() { // initialize timer CAutoDlg::SetTimerPeriod(m_TimerPeriod); m_Timer = m_Frm->SetTimer(1, m_TimerPeriod, NULL); // create control bars and dock them in a row int DockStyle = CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM; // horizontal only CControlBar *LeftOf = m_Frm->GetToolBar(); for (int i = 0; i < DLGBARS; i++) { m_DlgBar[i]->Create(m_Frm, m_DlgBarResID[i], 0, DockStyle, i, LeftOf); LeftOf = m_DlgBar[i]; } // now hide docked bars in case frame can't restore dock state for (i = 0; i < DLGBARS; i++) m_Frm->ShowControlBar(m_DlgBar[i], FALSE, 0); // initialize dialog bar data m_MasterVolBar.SetWindowText(LDS(MASTER_VOLUME)); m_MasterVolBar.SetBarCaption(LDS(MASTER)); if (!GetAutoBar(MASTER_VOL_AUTO, m_MasterVolBar)) m_MasterVolBar.SetVolume(1); // default master volume if (!GetAutoBar(CROSSFADER_AUTO, m_CrossfaderBar)) m_CrossfaderBar.SetPos(.5); // default crossfader position m_CrossfaderBar.SetFaderType(CPersist::GetInt(REG_SETTINGS, CROSSFADER_TYPE, 0)); // applying our tool tip state here is useless, because when we return, the // main frame restores the bar state, which magically enables tool tips for // all the bars; the main frame has to apply our tool tip state for us, but EnableToolTips(m_OptionsDlg.ShowToolTips()); // do it anyway just in case }
BOOL CSongPropsDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(theApp.LoadIcon(IDR_MAINFRAME), 0); CPatchGeneralDlg::InitNoteCombo(m_KeySig); m_KeySig.SetCurSel(m_Props.m_Key); m_TimeSigNumer.SetVal(m_Props.m_Meter.m_Numerator); CStringArrayEx sUnit; CPartBassDlg::GetPowerOfTwoStrings(sUnit, CSong::CMeter::MIN_UNIT_EXP, CSong::CMeter::MAX_UNIT_EXP); int nUnits = sUnit.GetSize(); for (int iUnit = 0; iUnit < nUnits; iUnit++) m_TimeSigDenom.AddString(sUnit[iUnit]); DWORD iSelUnit; _BitScanReverse(&iSelUnit, m_Props.m_Meter.m_Denominator); m_TimeSigDenom.SetCurSel(iSelUnit); m_Tempo.SetVal(m_Props.m_Tempo); m_Transpose.SetVal(m_Props.m_Transpose); m_Comments.SetWindowText(m_Props.m_Comments); EnableToolTips(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CModControlDlg::OnInitDialog() //--------------------------------- { CDialog::OnInitDialog(); EnableToolTips(TRUE); return TRUE; }
/* ================ DialogAFView::DialogAFView ================ */ DialogAFView::DialogAFView(CWnd *pParent /*=NULL*/) : CDialog(DialogAFView::IDD, pParent) { m_showBodies = cvarSystem->GetCVarBool("af_showBodies"); m_showBodyNames = cvarSystem->GetCVarBool("af_showBodyNames"); m_showMass = cvarSystem->GetCVarBool("af_showMass"); m_showTotalMass = cvarSystem->GetCVarBool("af_showTotalMass"); m_showInertia = cvarSystem->GetCVarBool("af_showInertia"); m_showVelocity = cvarSystem->GetCVarBool("af_showVelocity"); m_showConstraints = cvarSystem->GetCVarBool("af_showConstraints"); m_showConstraintNames = cvarSystem->GetCVarBool("af_showConstraintNames"); m_showPrimaryOnly = cvarSystem->GetCVarBool("af_showPrimaryOnly"); m_showLimits = cvarSystem->GetCVarBool("af_showLimits"); m_showConstrainedBodies = cvarSystem->GetCVarBool("af_showConstrainedBodies"); m_showTrees = cvarSystem->GetCVarBool("af_showTrees"); m_showSkeleton = cvarSystem->GetCVarInteger("af_showSkel") == 1; m_showSkeletonOnly = cvarSystem->GetCVarInteger("af_showSkel") == 2; m_debugLineDepthTest = cvarSystem->GetCVarBool("r_debugLineDepthTest"); m_debugLineUseArrows = cvarSystem->GetCVarInteger("r_debugArrowStep") != 0; m_noFriction = cvarSystem->GetCVarBool("af_skipFriction"); m_noLimits = cvarSystem->GetCVarBool("af_skipLimits"); m_gravity = cvarSystem->GetCVarFloat("g_gravity"); m_noGravity = (m_gravity == 0.0f); m_noSelfCollision = cvarSystem->GetCVarBool("af_skipSelfCollision"); m_showTimings = cvarSystem->GetCVarBool("af_showTimings"); m_dragEntity = cvarSystem->GetCVarBool("g_dragEntity"); m_dragShowSelection = cvarSystem->GetCVarBool("g_dragShowSelection"); Create(IDD_DIALOG_AF_VIEW, pParent); EnableToolTips(TRUE); }
bool CPWPropertyPage::InitToolTip(int Flags, int delayTimeFactor) { m_pToolTipCtrl = new CToolTipCtrl; if (!m_pToolTipCtrl->Create(this, Flags)) { pws_os::Trace(L"Unable To create ToolTip\n"); delete m_pToolTipCtrl; m_pToolTipCtrl = NULL; return false; } else { EnableToolTips(); // Delay initial show & reshow if (delayTimeFactor == 0) { // Special case for Question Mark 'button' m_pToolTipCtrl->SetDelayTime(TTDT_INITIAL, 0); m_pToolTipCtrl->SetDelayTime(TTDT_RESHOW, 0); m_pToolTipCtrl->SetDelayTime(TTDT_AUTOPOP, 30000); } else { int iTime = m_pToolTipCtrl->GetDelayTime(TTDT_AUTOPOP); m_pToolTipCtrl->SetDelayTime(TTDT_INITIAL, iTime); m_pToolTipCtrl->SetDelayTime(TTDT_RESHOW, iTime); m_pToolTipCtrl->SetDelayTime(TTDT_AUTOPOP, iTime * delayTimeFactor); } m_pToolTipCtrl->SetMaxTipWidth(300); } return true; }
BOOL CSettingsProgsDiff::OnInitDialog() { ISettingsPropPage::OnInitDialog(); EnableToolTips(); AdjustControlSize(IDC_EXTDIFF_OFF); AdjustControlSize(IDC_EXTDIFF_ON); AdjustControlSize(IDC_DIFFVIEWER_OFF); AdjustControlSize(IDC_DIFFVIEWER_ON); m_sDiffPath = m_regDiffPath; m_iExtDiff = IsExternal(m_sDiffPath); SHAutoComplete(::GetDlgItem(m_hWnd, IDC_EXTDIFF), SHACF_FILESYSTEM | SHACF_FILESYS_ONLY); m_sDiffViewerPath = m_regDiffViewerPath; m_iDiffViewer = IsExternal(m_sDiffViewerPath); SHAutoComplete(::GetDlgItem(m_hWnd, IDC_DIFFVIEWER), SHACF_FILESYSTEM | SHACF_FILESYS_ONLY); m_tooltips.AddTool(IDC_EXTDIFF, IDS_SETTINGS_EXTDIFF_TT); m_tooltips.AddTool(IDC_DIFFVIEWER, IDS_SETTINGS_DIFFVIEWER_TT); UpdateData(FALSE); return TRUE; }
/* ================ CSyntaxRichEditCtrl::Init ================ */ void CSyntaxRichEditCtrl::Init(void) { // get the Rich Edit ITextDocument to use the wonky TOM interface IRichEditOle *ire = GetIRichEditOle(); IUnknown *iu = (IUnknown *)ire; if (iu == NULL || iu->QueryInterface(tom::IID_ITextDocument, (void **) &m_TextDoc) != S_OK) { m_TextDoc = NULL; } InitFont(); InitSyntaxHighlighting(); SetEventMask(GetEventMask() | ENM_CHANGE | ENM_KEYEVENTS | ENM_MOUSEEVENTS | ENM_PROTECTED); // ENM_SCROLLEVENTS EnableToolTips(TRUE); // create auto complete list box CRect rect(0, 0, AUTOCOMPLETE_WIDTH, AUTOCOMPLETE_HEIGHT); autoCompleteListBox.Create(WS_DLGFRAME | WS_VISIBLE | WS_VSCROLL | LBS_SORT | LBS_NOTIFY, rect, this, IDC_LISTBOX_AUTOCOMPLETE); autoCompleteListBox.SetFont(GetParent()->GetFont()); autoCompleteListBox.ShowWindow(FALSE); // create function parameter tool tip funcParmToolTip.Create(WS_VISIBLE | WS_BORDER, rect, this, IDC_EDITBOX_FUNCPARMS); funcParmToolTip.SetFont(GetParent()->GetFont()); funcParmToolTip.ShowWindow(FALSE); }
/* ================ DialogDeclBrowser::OnInitDialog ================ */ BOOL DialogDeclBrowser::OnInitDialog() { com_editors |= EDITOR_DECL; CDialog::OnInitDialog(); GetClientRect( initialRect ); statusBar.CreateEx( SBARS_SIZEGRIP, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM, initialRect, this, AFX_IDW_STATUS_BAR ); baseDeclTree.Create( 0, initialRect, this, IDC_DECLBROWSER_BASE_TREE ); InitBaseDeclTree(); findNameString = "*"; findNameEdit.SetWindowText( findNameString ); findTextString = ""; findTextEdit.SetWindowText( findTextString ); numListedDecls = baseDeclTree.SearchTree( DeclBrowserCompareDecl, this, declTree ); statusBar.SetWindowText( va( "%d decls listed", numListedDecls ) ); EnableToolTips( TRUE ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CRecordPlayerDlg::OnInitDialog() { CPersistDlg::OnInitDialog(); SetIcon(theApp.LoadIcon(IDR_MAINFRAME), 0); m_Resize.AddControlList(this, m_CtrlList); CRect rWnd; GetWindowRect(rWnd); m_InitSize = rWnd.Size(); m_TrackList.CreateColumns(m_ColInfo, COLUMNS); m_TrackList.SetExtendedStyle(LVS_EX_CHECKBOXES); m_PlayBtn.SetIcons(IDI_REC_PLAY_PLAY, IDI_REC_PLAY_PAUSE); m_StopBtn.SetIcons(IDI_REC_PLAY_STOP, IDI_REC_PLAY_STOP); m_PositionText.SetFont(GetFont()); // pass in our font // open most recent recording if available CPathStr sRecPath = theApp.GetMain()->GetRecordFilePath(); if (!sRecPath.IsEmpty()) { // if recording path is available sRecPath.RenameExtension(MIDI_RECORD_EXT); // override extension if (PathFileExists(sRecPath)) // if recording exists Open(sRecPath); // open most recent recording } EnableToolTips(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
LRESULT CBrowsersToolbarDlg::HandleInitDialog(WPARAM wParam, LPARAM lParam) { LRESULT nStatus = CDialogBar::HandleInitDialog(wParam, lParam); CString sTitle; sTitle.LoadString(IDS_TOOLBARTITLE_BROWSERS); SetWindowText(sTitle); m_cIE.SubclassDlgItem(IDC_BUTTON_TOOLBAR_IE, this); m_cIE.LoadPNG(_T("IEXPLORE32.PNG"), 2); m_cFirefox.SubclassDlgItem(IDC_BUTTON_TOOLBAR_FIREFOX, this); m_cFirefox.LoadPNG(_T("FIREFOX32.PNG"), 2); m_cOpera.SubclassDlgItem(IDC_BUTTON_TOOLBAR_OPERA, this); m_cOpera.LoadPNG(_T("OPERA32.PNG"), 2); m_cSafari.SubclassDlgItem(IDC_BUTTON_TOOLBAR_SAFARI, this); m_cSafari.LoadPNG(_T("SAFARI32.PNG"), 2); SetBarStyle(GetBarStyle() | CBRS_FLYBY | CBRS_TOOLTIPS); EnableToolTips(TRUE); return nStatus; }
/* ================ DialogAFBody::DialogAFBody ================ */ DialogAFBody::DialogAFBody( CWnd* pParent /*=NULL*/ ) : CDialog(DialogAFBody::IDD, pParent) , constraintDlg(NULL) , numJoints(0) , cm_length(0) , cm_height(0) , cm_width(0) , cm_density(0) , cm_numSides(3) , cm_origin_x(0) , cm_origin_y(0) , cm_origin_z(0) , cm_angles_pitch(0) , cm_angles_yaw(0) , cm_angles_roll(0) , m_selfCollision(false) , m_linearFriction(0) , m_angularFriction(0) , m_contactFriction(0) , file(NULL) , body(NULL) { Create( IDD_DIALOG_AF_BODY, pParent ); EnableToolTips( TRUE ); }
BOOL CTopView::OnInitDialog() { CDialog::OnInitDialog(); // TODO: 在此添加额外的初始化 GetDlgItem(IDC_BTN_MIN)->MoveWindow(735,0,20,20); m_BtnMin.DrawTransparent(TRUE); m_BtnMin.SetBitmaps(IDB_BIT_MIN1,RGB(255,255,255)); m_BtnMin.SetTooltipText(_T("最小化")); GetDlgItem(IDC_BTN_OFF)->MoveWindow(760,0,20,20); m_BtnOff.DrawTransparent(TRUE); m_BtnOff.SetBitmaps(IDB_BIT_OFF1,RGB(255,255,255)); m_BtnOff.SetTooltipText(_T("关闭")); GetDlgItem(IDC_LINK)->SetWindowPos(0,291,2,200,23,0); GetDlgItem(IDC_LINK)->GetWindowRect(m_Rc); ScreenToClient(&m_Rc); EnableToolTips(TRUE); m_tt.Create(this); m_tt.Activate(TRUE); return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE }
/* ================ DialogDeclEditor::OnInitDialog ================ */ BOOL DialogDeclEditor::OnInitDialog() { com_editors |= EDITOR_DECL; CDialog::OnInitDialog(); // load accelerator table m_hAccel = ::LoadAccelerators(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR_DECLEDITOR)); // create status bar statusBar.CreateEx(SBARS_SIZEGRIP, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM, initialRect, this, AFX_IDW_STATUS_BAR); declEdit.Init(); GetClientRect(initialRect); EnableToolTips(TRUE); testButton.EnableWindow(FALSE); okButton.EnableWindow(FALSE); UpdateStatusBar(); return FALSE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL COptionsDlg::OnInitDialog() { CDialog::OnInitDialog(); EnableToolTips(TRUE); int layout = Registry::GetActionBarLayout(0); if (layout == 1) { GetDlgItem(IDC_SETTINGS_HORZACTIONBAR)->SendMessage(BM_SETCHECK, MAKEWORD(BST_CHECKED, 0), 0L); } int dock = Registry::GetActionBarDock(DefaultActionBarDock); if (dock == 1) { GetDlgItem(IDC_SETTINGS_DOCKACTIONBAR)->SendMessage(BM_SETCHECK, MAKEWORD(BST_CHECKED, 0), 0L); } dock = Registry::GetChatWndDock(DefaultChatWndDock); if (dock == 1) { GetDlgItem(IDC_SETTINGS_DOCKCHATWND)->SendMessage(BM_SETCHECK, MAKEWORD(BST_CHECKED, 0), 0L); } else if (dock == 2) { GetDlgItem(IDC_SETTINGS_DOCKCHATLEFT)->SendMessage(BM_SETCHECK, MAKEWORD(BST_CHECKED, 0), 0L); } int soundson = Registry::GetSoundEnabled(1); if (soundson == 1) { GetDlgItem(IDC_SETTINGS_SOUNDS)->SendMessage(BM_SETCHECK, MAKEWORD(BST_CHECKED, 0), 0L); } int ttips = Registry::GetActionBarTTips(1); if (ttips == 1) { GetDlgItem(IDC_SETTINGS_TTIPS)->SendMessage(BM_SETCHECK, MAKEWORD(BST_CHECKED, 0), 0L); } int takefocus = Base::GameLogic::TakeFocusOnRequest(); if (takefocus == 1) { GetDlgItem(IDC_TAKEFOCUS)->SendMessage(BM_SETCHECK, MAKEWORD(BST_CHECKED, 0), 0L); } CString s = Registry::GetHandLogEmailAddress(""); GetDlgItem(IDC_SETTINGS_EMAILADDRESS)->SetWindowText(s); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL COptionTab11::OnInitDialog() { CPropertyPage::OnInitDialog(); EnableToolTips(true); // TOOL TIPS if (LANG_T(-1)) { // Patcher en français SetDlgItemTextCP(this, IDC_STATIC_asso,LANG_W1); SetDlgItemTextCP(this, IDC_STATIC_filetype,LANG_W2); SetDlgItemTextCP(this, IDC_STATIC_mime,LANG_W3); } SetWindowTextCP(this, LANG_IOPT11); // mode modif à la volée if (modify==1) { GetDlgItem(IDC_ext1 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ext2 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ext3 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ext4 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ext5 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ext6 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ext7 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_ext8 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime1 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime2 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime3 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime4 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime5 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime6 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime7 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_mime8 ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_up ) ->ModifyStyle(0,WS_DISABLED); GetDlgItem(IDC_down ) ->ModifyStyle(0,WS_DISABLED); } else { GetDlgItem(IDC_ext1 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ext2 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ext3 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ext4 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ext5 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ext6 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ext7 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_ext8 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime1 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime2 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime3 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime4 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime5 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime6 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime7 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_mime8 ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_up ) ->ModifyStyle(WS_DISABLED,0); GetDlgItem(IDC_down ) ->ModifyStyle(WS_DISABLED,0); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CLATEDView::OnInitialUpdate() { m_strLinkGroupLabel.LoadString(IDS_LATED_LINKGROUP_LABEL); m_strDataGroupLabel.LoadString(IDS_LATED_DATAGROUP_LABEL); m_strLinkGroupTT.LoadString(IDS_LATED_LINKGROUP_TT); m_strDataGroupTT.LoadString(IDS_LATED_DATAGROUP_TT); EnableToolTips(TRUE); // enable tool tips for view }
/* ================ DialogAFConstraintFixed::DialogAFConstraintFixed ================ */ DialogAFConstraintFixed::DialogAFConstraintFixed(CWnd* pParent /*=NULL*/) : CDialog(DialogAFConstraintFixed::IDD, pParent) , constraint(NULL) , file(NULL) { Create( IDD_DIALOG_AF_CONSTRAINT_FIXED, pParent ); EnableToolTips( TRUE ); }
void CControlBar::SetBarStyle( DWORD dwStyle ) /********************************************/ { DWORD dwOldStyle = m_dwStyle; m_dwStyle = dwStyle; EnableToolTips( dwStyle & CBRS_TOOLTIPS ); OnBarStyleChange( dwOldStyle, dwStyle ); }
void CMultiMix::ShowOptionsDlg() { if (m_OptionsDlg.DoModal() == IDOK) { for (int i = 0; i < GetMixerCount(); i++) ApplyOptions(m_Mixer[i]); EnableToolTips(m_OptionsDlg.ShowToolTips()); } }
void CMdiView::OnInitialUpdate() { CView::OnInitialUpdate(); m_Edit.Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, CRect(10, 10, 100, 100), this, IDC_TTEDIT); EnableToolTips(TRUE); // enable tool tips for view }
void DLlist::PreSubclassWindow() { // TODO: 在此添加专用代码和/或调用基类 ModifyStyle(0,LVS_OWNERDRAWFIXED); //GetToolTips()->Activate(FALSE); VERIFY( EnableToolTips(TRUE) ); CListCtrl::PreSubclassWindow(); }
void CClipboardListBox::PreSubclassWindow() { // TODO: Add your specialized code here and/or call the base class CListBox::PreSubclassWindow(); EnableToolTips(TRUE); }
// Called by the framework to allow other necessary sub classing to occur // before the window is sub classed. void MyGraph::PreSubclassWindow() { VALIDATE; CStatic::PreSubclassWindow(); VERIFY(EnableToolTips(true)); }