summaryrefslogtreecommitdiff
path: root/Shutdown/ItemDlg.h
blob: f3abab1536df37540eda4feec57ddb3a9f6dcf80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//////////////////////////////////////////////////////////////////
//  
// ItemDlg.h : header file
//
// Dialog for Shutdown. Handles different pix and strings etc..
//
//////////////////////////////////////////////////////////////////


#if !defined(AFX_ITEMDLG_H__39C297A3_2DCF_11D2_B2D4_0020182B97FC__INCLUDED_)
#define AFX_ITEMDLG_H__39C297A3_2DCF_11D2_B2D4_0020182B97FC__INCLUDED_

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

#include <atlwin.h>
#include <atlctrls.h>
#include "resource.h"

#include "PersistPosWindow.h"

/////////////////////////////////////////////////////////////////////////////
// CItemDlg dialog

class CItemDlg 
	: public CDialogImplEx,
//	: public CDialogImpl<CItemDlg>
	public CPersistPosWindow<CItemDlg>

{
// Construction
public:
	CItemDlg();   // standard constructor
	~CItemDlg()
		{ if(IsWindow()) DestroyWindow(); } 

	// Used to tick off an item
	// if bState is false means failed
	bool CheckOffItem(int nItem, bool bState = true);

	// Give item a pointer next to it
	bool SetCurrentItem(int nItem);

	// Has Cancel Button been pressed
	bool IsCancelled() 	
		{ return m_bCancel; };

// Dialog Data
	enum { IDD = IDD_ITEMDLG };
	CListViewCtrl	m_ctlItems;


// Implementation
protected:
	void CancelItemSelection();
	bool m_bCancel;
	CImageList m_ImageListSmall;
	HICON m_hIcon;


BEGIN_MSG_MAP(CNormalPage)
	MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
	MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
	NOTIFY_HANDLER(IDC_ITEMS, NM_SETFOCUS, OnSetFocusItems)
	COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnCancel)
	MESSAGE_HANDLER(WM_CLOSE, OnClose)
END_MSG_MAP()

	// Generated message map functions
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnSetFocusItems(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ITEMDLG_H__39C297A3_2DCF_11D2_B2D4_0020182B97FC__INCLUDED_)