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

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
// TrayIconMouseMsgHandler.h : header file

#pragma once

class CTrayIconMouseMsgHandler;

// Synomym for CTrayIconMouseMsgHandler pointer
typedef CTrayIconMouseMsgHandler* MouseMsgHandlerPtr;

// CTrayIconMouseMsgHandler

class CTrayIconMouseMsgHandler: public CObject
{
public:

	// Single paramenter constructor, a mosue message identfier has to be passed
	CTrayIconMouseMsgHandler(unsigned int uMouseMsgID)
	{
		m_uMouseMsgID = uMouseMsgID;
	}

	// Pure-virtual callback mouse message handler, necessary to be implemented by the derived class, for handling system tray icon notifications.
	virtual void MouseMsgHandler() = 0;

	// Gets the mouse message identifier
	unsigned int GetMouseMsgID() const
	{
		return m_uMouseMsgID;
	}

	// Sets the mosue message identifier
	void SetMouseMsgID(unsigned int uMouseMsgID)
	{
		m_uMouseMsgID = uMouseMsgID;
	}

	// Virtual descturctor, to be implemented by the derived class if some clean-up has to be performed
	virtual ~CTrayIconMouseMsgHandler(){}

private:
	
	CTrayIconMouseMsgHandler(){}

	unsigned int m_uMouseMsgID;
};

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 | Terms of Use | Mobile
Web03 | 2.8.1411023.1 | Last Updated 6 Jun 2007
Article Copyright 2004 by Muneeb Ahmed Awan
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid