Click here to Skip to main content
15,884,298 members
Articles / Desktop Programming / MFC

System Tray Icons

Rate me:
Please Sign up or sign in to vote.
4.66/5 (26 votes)
1 Apr 2012CPOL8 min read 211.2K   7K   136  
An article on creating, manipulating and showing popup balloons on system tray icons.
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__67BA653D_35FE_427D_B459_12232EB21F76__INCLUDED_)
#define AFX_MAINFRM_H__67BA653D_35FE_427D_B459_12232EB21F76__INCLUDED_

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

#include "MyAppTrayIcon.h"

class CMainFrame : public CMDIFrameWnd
{
	DECLARE_DYNAMIC(CMainFrame)
public:
	CMainFrame();

// Attributes
public:

// Operations
public:
    CMyAppTrayIcon m_stiIcon;
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;

// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnShowiconsKeys();
    afx_msg void OnShowiconsQuestion();
    afx_msg void OnShowiconsUsers();
    afx_msg void OnHideiconsKeys();
    afx_msg void OnHideiconsInfo();
    afx_msg void OnHideiconsQuestion();
    afx_msg void OnHideiconsUsers();
    afx_msg void OnDeleteiconsKeys();
    afx_msg void OnDeleteiconsInfo();
    afx_msg void OnDeleteiconsQuestion();
    afx_msg void OnDeleteiconsUsers();
    afx_msg void OnShowiconsInfo();
    afx_msg void OnShowballoonsKeys();
    afx_msg void OnShowballoonsInfo();
    afx_msg void OnShowballoonsQuestion();
    afx_msg void OnShowballoonsUsers();
    afx_msg void OnChangetextForkeysicon();
    afx_msg void OnChangetextInfo();
    afx_msg void OnChangetextQuestion();
    afx_msg void OnChangetextUser();
};

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_MAINFRM_H__67BA653D_35FE_427D_B459_12232EB21F76__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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions