コード例 #1
0
ファイル: CNotifyIcon.cpp プロジェクト: fanliaokeji/lvdun
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);
}
コード例 #2
0
ファイル: toplevel.cpp プロジェクト: chromylei/third_party
void wxTopLevelWindowX11::SetIcons(const wxIconBundle& icons )
{
    // this sets m_icon
    wxTopLevelWindowBase::SetIcons( icons );

    DoSetIcon( icons.GetIcon( -1 ) );
    wxSetIconsX11( wxGlobalDisplay(), X11GetMainWindow(), icons );
}
コード例 #3
0
ファイル: frame.cpp プロジェクト: hgwells/tive
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);
}
コード例 #4
0
ファイル: CNotifyIcon.cpp プロジェクト: fanliaokeji/lvdun
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());
}
コード例 #5
0
void MCButton::SetHoverIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon)
{
    DoSetIcon(ctxt, CI_HOVER, p_icon);
}
コード例 #6
0
void MCButton::SetVisitedIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon)
{
    DoSetIcon(ctxt, CI_VISITED, p_icon);
}
コード例 #7
0
void MCButton::SetHiliteIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon)
{
    DoSetIcon(ctxt, CI_HILITED, p_icon);
}
コード例 #8
0
void MCButton::SetIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon)
{
    DoSetIcon(ctxt, CI_DEFAULT, p_icon);
}
コード例 #9
0
void MCButton::SetDisabledIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon)
{
    DoSetIcon(ctxt, CI_DISABLED, p_icon);
}
コード例 #10
0
void MCButton::SetArmedIcon(MCExecContext& ctxt, const MCInterfaceButtonIcon& p_icon)
{
    DoSetIcon(ctxt, CI_ARMED, p_icon);
}