Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

CTrayIcon - System Tray Icon Wrapper

, 6 Jun 2007
An article exhibiting a wrapper class for System Taskbar icon.
ctrayicon_demo.zip
CTrayIconDemo.exe
ctrayicon_src.zip
res
CTrayIconDemo.ico
ico00001.ico
ico00002.ico
idr_main.ico
Thumbs.db
CTrayIconDemo.aps
CTrayIconDemo.clw
CTrayIconDemo.dsp
CTrayIconDemo.dsw
CTrayIconDemo.ncb
CTrayIconDemo.opt
CTrayIconDemo.plg
demo.zip
Demo
CTrayIconDemo.exe
src.zip
Src
CTrayIconDemo.clw
CTrayIconDemo.dsp
CTrayIconDemo.dsw
res
CTrayIconDemo.ico
// CTrayIconDemoDlg.h : header file
//

#if !defined(AFX_CTRAYICONDEMODLG_H__3E1CD20A_74CE_47A0_8FC2_A4490A4F18FC__INCLUDED_)
#define AFX_CTRAYICONDEMODLG_H__3E1CD20A_74CE_47A0_8FC2_A4490A4F18FC__INCLUDED_

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

#include "TrayIcon.h"

/////////////////////////////////////////////////////////////////////////////
// CCTrayIconDemoDlg dialog

class CLeftMouseDblClickMsgHandler: public CTrayIconMouseMsgHandler
{
public:

	CLeftMouseDblClickMsgHandler(){}

	virtual void MouseMsgHandler();
};

class CRightMouseClickMsgHandler: public CTrayIconMouseMsgHandler
{
public:

	CRightMouseClickMsgHandler(UINT uMouseMsg) : CTrayIconMouseMsgHandler(uMouseMsg){}

	virtual void MouseMsgHandler();
};

class CCTrayIconDemoDlg : public CDialog
{

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

// Dialog Data
	//{{AFX_DATA(CCTrayIconDemoDlg)
	enum { IDD = IDD_CTRAYICONDEMO_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCTrayIconDemoDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	CTrayIcon* m_pTrayIcon;
	
	// Generated message map functions
	//{{AFX_MSG(CCTrayIconDemoDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg LRESULT OnTaskBarCreated(WPARAM wp, LPARAM lp);
	afx_msg void OnNotifyIcon(WPARAM wp, LPARAM lp);
	afx_msg void OnHide();
	afx_msg void OnAbout();
	virtual void OnCancel();
	afx_msg void OnShow();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CTRAYICONDEMODLG_H__3E1CD20A_74CE_47A0_8FC2_A4490A4F18FC__INCLUDED_)

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

Share

About the Author

No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140922.1 | Last Updated 6 Jun 2007
Article Copyright 2004 by Muneeb Ahmed Awan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid