⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 animatetrayicon.h

📁 一些关于C++开发的多媒体制作书籍的源代码
💻 H
字号:
/*
* Copyright (c) 2002, Bcdliang
* All rights reserved.
*
* 文件名称:CAnimateTrayIcon.h
* 摘    要:类CAnimateTrayIcon的声明
*
* 当前版本:1.01
* 作    者:LIANG Zheng
* 完成日期:2002年8月11日
*/

#if !defined(AFX_ANIMATETRAYICON_H__12E1F6E6_FF77_4A90_A582_25E89D651D94__INCLUDED_)
#define AFX_ANIMATETRAYICON_H__12E1F6E6_FF77_4A90_A582_25E89D651D94__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CAnimateTrayIcon
{
// Construction
public:
	CAnimateTrayIcon(
		CWnd *pWnd,					// Window asossiated with the tray icon
		UINT uCallbackMessage,		// Callback msg ID used by the window
		UINT nResourceID,			// Resource ID of the images list
		UINT uImageWidth,			// Width(&height) of each image in the image list
		COLORREF crTransparent		// Color to be made transparent 
		);

// Attributes
public:

// Operations
public:
	BOOL AddToTray(const CString &strTip);
	BOOL DeleteFromTray();
	BOOL ModifyTip(const CString &strTip);
	BOOL EnableTrayAnimate(BOOL bTrayAnimate = true);
	BOOL EnableWindowAnimate(BOOL bWindowAnimate = true);
	void SetUpdateInterval(UINT uUpdateInterval);
	UINT GetUpdateInterval() const;
	BOOL ShowNextIcon();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAnimateTrayIcon)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CAnimateTrayIcon();

// Attributes
private:
	CImageList	m_imgList;
	HICON	m_hIcon;
	CWnd	*m_pWnd;
	UINT	m_uImages;
	NOTIFYICONDATA	m_nid;
	BOOL	m_bTrayAnimate;
	BOOL	m_bWindowAnimate;
	UINT	m_uUpdateInterval;
	BOOL	m_bAlreadyInTray;
	UINT	m_uCurrentImage;
};
/*
void CALLBACK EXPORT TimerProc(
   HWND hWnd,      // handle of CWnd that called SetTimer
   UINT nMsg,      // WM_TIMER
   UINT nIDEvent,   // timer identification
   DWORD dwTime    // system time
);
*/
#endif // !defined(AFX_ANIMATETRAYICON_H__12E1F6E6_FF77_4A90_A582_25E89D651D94__INCLUDED_)


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -