void CNotifyIcon::SetIcon(PCTSTR pszIconPath, PCTSTR pszTip) { if (pszIconPath == NULL) { DoSetIcon(m_DefaultNotify, m_strDefaultTip.c_str()); return; } if (PathFileExists(pszIconPath) == FALSE) { return; } HICON hIcon = (HICON)LoadImage(NULL, pszIconPath, IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR | LR_LOADFROMFILE); TSDEBUG4CXX(L"[XAppLuaTool]NotifyIcon pszIconPath = " << pszIconPath<<L"HICON = "<<hIcon); if (hIcon == NULL) { return ; } if (m_hCustomIcon != NULL) { DestroyIcon(m_hCustomIcon); m_hCustomIcon = NULL; } m_hCustomIcon = hIcon; m_strCustomIconPath = pszIconPath; if (pszTip == NULL) { pszTip = _T(""); } DoSetIcon(hIcon, pszTip); }
void wxTopLevelWindowX11::SetIcons(const wxIconBundle& icons ) { // this sets m_icon wxTopLevelWindowBase::SetIcons( icons ); DoSetIcon( icons.GetIcon( -1 ) ); wxSetIconsX11( wxGlobalDisplay(), X11GetMainWindow(), icons ); }
void wxFrame::SetIcons(const wxIconBundle& icons) { wxFrameBase::SetIcons( icons ); if (!m_frameShell) return; DoSetIcon( m_icons.GetIcon( -1 ) ); wxSetIconsX11(GetXDisplay(), (WXWindow) XtWindow( (Widget) m_frameShell ), icons); }
void CNotifyIcon::SetIcon(HICON hIcon, PCTSTR pszTip) { Init(); std::wstring strTipText(L""); if (hIcon == NULL) { hIcon = m_DefaultNotify; strTipText = m_strDefaultTip; } else if (pszTip != NULL) //hIcon != NULL && pszTip != NULL { strTipText = pszTip; } DoSetIcon(hIcon, strTipText.c_str()); }
void MCButton::SetHoverIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon) { DoSetIcon(ctxt, CI_HOVER, p_icon); }
void MCButton::SetVisitedIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon) { DoSetIcon(ctxt, CI_VISITED, p_icon); }
void MCButton::SetHiliteIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon) { DoSetIcon(ctxt, CI_HILITED, p_icon); }
void MCButton::SetIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon) { DoSetIcon(ctxt, CI_DEFAULT, p_icon); }
void MCButton::SetDisabledIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon) { DoSetIcon(ctxt, CI_DISABLED, p_icon); }
void MCButton::SetArmedIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon) { DoSetIcon(ctxt, CI_ARMED, p_icon); }