Click here to Skip to main content
15,886,639 members
Articles / Desktop Programming / MFC

A reminder tool for .dan.g's ToDoList

Rate me:
Please Sign up or sign in to vote.
3.60/5 (14 votes)
25 Feb 2004 152.8K   3.4K   61  
A simple reminder tool to remind you of your overdue tasks in ToDoList throughout the day
// TDLReminderToolDlg.h : header file
//

#if !defined(AFX_TDLREMINDERTOOLDLG_H__81401DCC_772D_4CBE_83AA_CF716587F884__INCLUDED_)
#define AFX_TDLREMINDERTOOLDLG_H__81401DCC_772D_4CBE_83AA_CF716587F884__INCLUDED_

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

const UINT WM_TASKBARCREATED = RegisterWindowMessage(TEXT("TaskbarCreated"));
const CString MYNOTIFYICON = "MyTDLNotifyIcon";
const UINT MYWM_NOTIFYICON = RegisterWindowMessage(MYNOTIFYICON);

#include "TODOList.h"
#include "ToDoListRemDlg.h"

/////////////////////////////////////////////////////////////////////////////
// CTDLReminderToolDlg dialog

class CTDLReminderToolDlg : public CDialog
{
// Construction
public:
	void SetTaskList(CString taskList);
	CTDLReminderToolDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTDLReminderToolDlg)
	enum { IDD = IDD_TDLREMINDERTOOL_DIALOG };
	CComboBox	m_updFreqCombo;
	CComboBox	m_freqCombo;
	UINT	m_remFrequency;
	BOOL	m_StartStop;
	UINT	m_updRemFrequency;
	BOOL	m_bPlayAudio;
	CString	m_audioFilePath;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CTDLReminderToolDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnStartstop();
	afx_msg void OnOk();
	virtual void OnCancel();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	afx_msg void OnSetreminder();
	afx_msg void OnExittdl();
	afx_msg void OnUpdnow();
	afx_msg void OnBrowseforaudio();
	afx_msg void OnChangeAudiofilepath();
	afx_msg void OnPlayaudio();
	//}}AFX_MSG
	afx_msg LRESULT OnTaskBarCreated(WPARAM wParam,LPARAM lParam);
	afx_msg LRESULT OnMyNotifyIcon(WPARAM wParam,LPARAM lParam);
	DECLARE_MESSAGE_MAP()

	void TrayAddIcon(DWORD dwMessage);
	HMENU m_hTrayMenu;
private:
	void extractOverDueTasks(vector<CTask>& overdue,CTask root);
	BOOL SetupRemindersList();
	CString m_taskListFileName;
	int m_freqType;
	int m_updType;
	CTODOList* m_pTodoList;
	CToDoListRemDlg m_RemDlg;
};

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

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


Written By
Team Leader www.unitronics.com
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions