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

System Tray Icons - Adding to your dialog application

, 15 Apr 2002
Easy to implement system tray icon!
ashsystray_demo.zip
ashsystray.dsw
ashsystray.exe
res
ashsystray.ico
idr_syst.ico
ashsystray.clw
ashsystray.dsp
// ashsystrayDlg.h : header file
//

#if !defined(AFX_ASHSYSTRAYDLG_H__E3615DCB_AA0B_497C_BF37_CD933FAD5AF6__INCLUDED_)
#define AFX_ASHSYSTRAYDLG_H__E3615DCB_AA0B_497C_BF37_CD933FAD5AF6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TrayNot.h"
/////////////////////////////////////////////////////////////////////////////
// CAshsystrayDlg dialog

class CAshsystrayDlg : public CDialog
{
// Construction
public:
	CTrayNot*	m_pTray;
	BOOL  m_bHidden;
	CAshsystrayDlg(CWnd* pParent = NULL);	// standard constructor
	
	void CANCEL();
// Dialog Data
	//{{AFX_DATA(CAshsystrayDlg)
	enum { IDD = IDD_ASHSYSTRAY_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CAshsystrayDlg)
	virtual BOOL OnInitDialog();
	afx_msg LONG OnTrayNotify ( WPARAM wParam, LPARAM lParam ) ;
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnTrayRestore();
	afx_msg void OnHideapp();
	afx_msg void OnHide();
	afx_msg void OnUnHide();
	afx_msg void OnDestroy();
	afx_msg void OnAppExit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_ASHSYSTRAYDLG_H__E3615DCB_AA0B_497C_BF37_CD933FAD5AF6__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

Ashman
Web Developer
Australia Australia
Name: Ash Rowe
From: Canberra, Australia
Qualifications: Diploma in Game Programming
Age: 19 (Getting old and feeling it)
 
Tutorials I have written in the past, I have done so in a fashion that would enable even the newest of programmers to get a grasp on what is actually happening with the code I submit. I am looking at writing even more in the near future to further assist others as well as gain a better understanding myself of the code I end up with.

| Advertise | Privacy | Mobile
Web03 | 2.8.141015.1 | Last Updated 16 Apr 2002
Article Copyright 2001 by Ashman
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid