Click here to Skip to main content
15,893,622 members
Articles / Programming Languages / C++

Tray Icon Class with Icon Animation Abilities

Rate me:
Please Sign up or sign in to vote.
4.76/5 (12 votes)
14 Dec 20034 min read 112.4K   3.9K   47  
A class which makes tray icons management and animation really easy
// akTrayIconDemoDlg.h : header file
//

#pragma once
#include "afxwin.h"

#include "akTrayIcon\akTrayIcon.h"


// CakTrayIconDemoDlg dialog
class CakTrayIconDemoDlg : public CDialog
{

private:
    CakTrayIcon m_TrayIcon;
    afx_msg LRESULT OnTrayIconNotify(WPARAM, LPARAM);

// Construction
public:
	CakTrayIconDemoDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_AKTRAYICONDEMO_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
    CEdit m_Tip;
    CEdit m_Info;
    CEdit m_Timeout;
    afx_msg void OnEnSetfocusEdTip();
    afx_msg void OnEnSetfocusEdInfo();
    afx_msg void OnEnSetfocusEdTimeout();
    afx_msg void OnBnClickedBtnChange();
    afx_msg void OnBnClickedBtnShow();
    afx_msg void OnBnClickedBtnAnimate();
    CEdit m_InfoTitle;
    CComboBox m_InfoType;
    CEdit m_AnimTip;
    afx_msg void OnEnSetfocusEdInfoTitle();
    afx_msg void OnCbnSetfocusCbInfoType();
    afx_msg void OnEnSetfocusEdAnimTip();
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United States United States
Started professional career in software development back in 2000, in Ukraine. Founder and owner of a boutique software company called ByteGems.com Software. Worked for 6 years at w2bi, Inc in New Jersey USA, currently work in a large multinational company based in Redmond, WA.

My buzzwords at the moment: .NET, C#, ASP.NET, MVC, LINQ, TypeScript, JavaScript, AngularJS, HTML, JSON, services.

Still buzzing: C++, Win32, ATL, MFC, SQL, WinForms, WebForms, EF, Sockets, TCP/IP, Remoting.

Comments and Discussions