//************************************ // 函数名称: SetTooltipText // 返回类型: bool // 参数信息: UINT _IDResource // 函数说明: //************************************ bool CTrayIconUI::SetTooltipText( UINT _IDResource ) { #ifdef UNICODE wchar_t mbuf[64]; LoadString(CPaintManagerUI::GetInstance(),_IDResource,mbuf,64); return SetTooltipText(mbuf); #else char mbuf[64]; LoadString(CPaintManagerUI::GetInstance(), _IDResource, mbuf, 64); return SetTooltipText(mbuf); #endif }
void CExtLabel::SetTooltipText( int nId ) { ASSERT_VALID( this ); CExtSafeString sText; g_ResourceManager->LoadString( sText, nId ); SetTooltipText( LPCTSTR(sText) ); }
BOOL CTrayIcon::SetTooltipText(UINT nID) { CString str; VERIFY(str.LoadString(nID)); return SetTooltipText(str); }
void CExtButton::SetTooltipText(int nId, BOOL bActivate) { CString sText; sText.LoadString(nId); if( !sText.IsEmpty() ) SetTooltipText(&sText, bActivate); }
BOOL CTryIconDriver::SetTooltipText(UINT nID) { CString strText; VERIFY(strText.LoadString(nID)); return SetTooltipText(strText); }
BOOL CSystemTray::SetTooltipText(UINT nID) { CString strText; VERIFY(strText.LoadString(nID)); return SetTooltipText(strText); }
//************************************ // 函数名称: SetTooltipText // 返回类型: bool // 参数信息: UINT _IDResource // 函数说明: //************************************ bool CDuiTrayIcon::SetTooltipText( UINT _IDResource ) { TCHAR mbuf[64]; LoadString(CPaintManagerUI::GetInstance(),_IDResource,mbuf,64); return SetTooltipText((LPCTSTR)mbuf); }
bool CXTPTrayIcon::Create( LPCTSTR lpszCaption, CWnd* pParentWnd, UINT nIconID, UINT uMenuID/*= 0*/, UINT uDefMenuItemID/*= 0*/, bool bDefMenuItemByPos/*= false*/) { m_nIconID = nIconID; m_strToolTip = lpszCaption; m_hWndNotify = pParentWnd->GetSafeHwnd(); m_iMaxTipSize = _countof(m_niData.szTip) - 1; // Set the tray icon and tooltip text SetIcon(m_nIconID); SetTooltipText(m_strToolTip); // Create an invisible window CWnd::CreateEx(0, XTPTRAYICON_CLASSNAME, lpszCaption, WS_POPUP, 0, 0, 0, 0, NULL, 0); m_niData.hWnd = m_hWnd; m_niData.uID = uMenuID; m_uDefMenuItemID = uDefMenuItemID; m_bDefMenuItemByPos = bDefMenuItemByPos; m_uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; return AddIcon(); }
BOOL CTrayNotifyIcon::SetTooltipText(UINT nID) { CString sToolTipText; VERIFY(sToolTipText.LoadString(nID)); return SetTooltipText(sToolTipText); }
BOOL CTrayNotifyIcon::SetTooltipText(UINT nID) { CTrayNotifyIconString sToolTipText; sToolTipText.LoadString(nID); //Let the other version of the function handle the rest return SetTooltipText(sToolTipText); }
BOOL CTrayNotifyIcon::SetTooltipText(UINT nID, BOOL bWin2k) { CString sToolTipText; VERIFY(sToolTipText.LoadString(nID)); //Let the other version of the function handle the rest return SetTooltipText(sToolTipText, bWin2k); }
void CButtonST::SetTooltipText(int nId, BOOL bActivate) { CString sText; // load string resource sText.LoadString(nId); // If string resource is not empty if (sText.IsEmpty() == FALSE) SetTooltipText(&sText, bActivate); } // End of SetTooltipText
// This function sets the text to show in the button tooltip. // // Parameters: // [IN] nText // ID number of the string resource containing the text to show. // [IN] bActivate // If TRUE the tooltip will be created active. // void CButtonST::SetTooltipText(int nText, BOOL bActivate) { CString sText; // Load string resource sText = AfxModuleLoadString(nText); // If string resource is not empty if (sText.IsEmpty() == FALSE) SetTooltipText((LPCTSTR)sText, bActivate); } // End of SetTooltipText
void CButtonST::SetTooltipText(int nId, bool bActivate) { CString sText; // load string resource sText.LoadString(nId); // If string resource is not empty if (!sText.IsEmpty()) { SetTooltipText((LPCTSTR)sText, bActivate); } }
BOOL CSystemTray::SetTooltipText(UINT nID) { TCHAR strBuffer[1024]; ASSERT(1024 >= m_nMaxTooltipLength); if (!LoadString(m_hInstance, nID, strBuffer, m_nMaxTooltipLength-1)) return FALSE; return SetTooltipText(strBuffer); }
bool CXTPTrayIcon::SetTooltipText(UINT nTipText) { CString strTipText; if (!strTipText.LoadString(nTipText)) { return false; } return SetTooltipText(strTipText); }
void CIconButton::SetTooltipText(int nTextID, BOOL bActivate) { CString sText; sText.LoadString(nTextID); if(!sText.IsEmpty()) { SetTooltipText((LPCTSTR)sText, bActivate); } }
void FWwiseEventDragDropOp::SetCanDrop(bool InCanDrop) { CanDrop = InCanDrop; SetTooltipText(); if( InCanDrop ) { MouseCursor = EMouseCursor::GrabHandClosed; SetToolTip(GetTooltipText(), NULL); } else { MouseCursor = EMouseCursor::SlashedCircle; SetToolTip(GetTooltipText(), FEditorStyle::GetBrush(TEXT("Graph.ConnectorFeedback.Error"))); } }
bool CTrayIcon::SetTooltipText( UINT _IDResource ) { TCHAR mbuf[256] = {0}; LoadString(CPaintManagerUI::GetInstance(), _IDResource,mbuf, 256); return SetTooltipText(mbuf); }
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { FARPROC lpProc = NULL; RECT rect = {0}; HMENU hMenu = NULL; HIMC hIMC = NULL; BOOL fOpen = FALSE; switch (message) { case WM_CREATE: // Create Status Window CreateTBar(hWnd); CreateStatus(hWnd); // Create Child Window GetClientRect(hWnd, &rect); if (!(hWndCompStr = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("CompStrWndClass"), NULL, WS_CHILD | WS_VISIBLE, // 0, 0, rect.right, rect.bottom - nStatusHeight, 0, 0, 0, 0, hWnd, NULL, hInst, NULL))) return FALSE; InitIMEUIPosition(hWndCompStr); if (!(hWndCandList = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("CandListWndClass"), NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hWnd, NULL, hInst, NULL))) return FALSE; ShowWindow(hWndCompStr, SW_SHOW); ShowWindow(hWndCandList, SW_SHOWNA); SetStatusItems(hWnd); hMenu = GetMenu(hWnd); CheckMenuItem(hMenu,IDM_SHOWCAND, (fShowCand ? MF_CHECKED : MF_UNCHECKED)); break; case WM_COMMAND: switch(LOWORD(wParam)) { case IDM_ABOUT: lpProc = (FARPROC)MakeProcInstance(AboutDlg, hInst); DialogBox(hInst, TEXT("ABOUTBOX"), hWnd, (DLGPROC)lpProc); FreeProcInstance(lpProc); break; case IDM_FONT: { CHOOSEFONT cf = {0}; LOGFONT lfT = {0}; /* Set all structure fields to zero. */ memset(&cf, 0, sizeof(CHOOSEFONT)); memcpy(&lfT, &lf, sizeof(LOGFONT)); cf.lStructSize = sizeof(CHOOSEFONT); cf.hwndOwner = hWnd; cf.lpLogFont = &lfT; cf.Flags = CF_SCREENFONTS | CF_EFFECTS; cf.nFontType = SCREEN_FONTTYPE; if (ChooseFont(&cf)) { if (hFont) { DeleteObject(hFont); } memcpy(&lf, &lfT, sizeof(LOGFONT)); hFont = CreateFontIndirect(&lf); InvalidateRect(hWndCompStr,NULL,TRUE); UpdateWindow(hWndCompStr); } } break; case IDM_SHOWCAND: hMenu = GetMenu(hWnd); fShowCand = !fShowCand; CheckMenuItem(hMenu,IDM_SHOWCAND, (fShowCand ? MF_CHECKED : MF_UNCHECKED)); MoveCompCandWindow(hWnd); UpdateShowCandButton(); break; case IDM_OPENSTATUS: hIMC = ImmGetContext(hWndCompStr); fOpen = ImmGetOpenStatus(hIMC); ImmSetOpenStatus(hIMC,!fOpen); UpdateShowOpenStatusButton(!fOpen); ImmReleaseContext(hWndCompStr,hIMC); hMenu = GetMenu(hWnd); CheckMenuItem(hMenu,IDM_OPENSTATUS, (fOpen ? MF_UNCHECKED : MF_CHECKED)); break; case IDM_NATIVEMODE: /* fall-through */ case IDM_FULLHALF: /* fall-through */ case IDM_ROMAN: /* fall-through */ case IDM_CHARCODE: /* fall-through */ case IDM_HANJA: /* fall-through */ case IDM_SOFTKBD: /* fall-through */ case IDM_EUDC: /* fall-through */ case IDM_SYMBOL: HandleModeCommand(hWnd,wParam,lParam); break; case IDM_CONVERT: /* fall-through */ case IDM_CANCEL: /* fall-through */ case IDM_REVERT: /* fall-through */ case IDM_COMPLETE: /* fall-through */ case IDM_OPENCAND: /* fall-through */ case IDM_CLOSECAND: /* fall-through */ case IDM_NEXTCAND: /* fall-through */ case IDM_PREVCAND: HandleConvertCommand(hWnd,wParam,lParam); break; case IDM_NEXTCLAUSE: /* fall-through */ case IDM_PREVCLAUSE: HandleChangeAttr(hWnd,(LOWORD(wParam) == IDM_NEXTCLAUSE)); break; default: break; } break; case WM_SETFOCUS: SetFocus(hWndCompStr); break; case WM_NOTIFY: SetTooltipText(hWnd, lParam); break; case WM_SIZE: SendMessage(hWndStatus,message,wParam,lParam); SendMessage(hWndToolBar,message,wParam,lParam); if (wParam != SIZE_MINIMIZED) { MoveCompCandWindow(hWnd); } break; case WM_IME_NOTIFY: switch (wParam) { case IMN_OPENSTATUSWINDOW: /* fall-through */ case IMN_CLOSESTATUSWINDOW: break; case IMN_SETCONVERSIONMODE: return (DefWindowProc(hWnd, message, wParam, lParam)); } break; case WM_DESTROY: if (hFont) { DeleteObject(hFont); } PostQuitMessage(0); break; default: return (DefWindowProc(hWnd, message, wParam, lParam)); } return 0L; }