本文整理匯總了C++中EnableToolTips函數的典型用法代碼示例。如果您正苦於以下問題:C++ EnableToolTips函數的具體用法?C++ EnableToolTips怎麽用?C++ EnableToolTips使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EnableToolTips函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: EnableToolTips
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
}
示例2: EnableToolTips
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;
}
示例3: EnableToolTips
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
}
示例4: GetDocument
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);
}
示例5: InitAFList
/*
================
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
}
示例6: AfxFormatString1
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;
}
示例7: strcpybuff
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
}
示例8: EnableToolTips
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
}
示例9: SetIcon
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
}
示例10: EnableToolTips
BOOL CModControlDlg::OnInitDialog()
//---------------------------------
{
CDialog::OnInitDialog();
EnableToolTips(TRUE);
return TRUE;
}
示例11: CDialog
/*
================
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);
}
示例12: EnableToolTips
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;
}
示例13: EnableToolTips
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;
}
示例14: GetIRichEditOle
/*
================
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);
}
示例15: GetClientRect
/*
================
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
}