summaryrefslogtreecommitdiff
path: root/NSCmpts/IgnoreProp.h
blob: 206519e4484215ca775f4c7e86ca45dadf691476 (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
// IgnoreProp.h: interface for the CIgnoreProp class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IGNOREPROP_H__93425F11_BC15_11D3_82FF_005056D45AB0__INCLUDED_)
#define AFX_IGNOREPROP_H__93425F11_BC15_11D3_82FF_005056D45AB0__INCLUDED_

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

#include <mystring.h>

#include "../common/CmptData.h"

#include <atlctrls.h>
#include <sysimglist.h>
#include <shlobj.h>

///////////////////////////////////////////////////////////////////////////////
// CIgnoreProp is common code for the Advanced Property Pages

class CIgnoreProp
{
public:
	CIgnoreProp(CPropertyBag& data) : m_Data(data) {}

// Message Handlers
protected:
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnEndLabelEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnListSetFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);

// Helper Functions
protected:
	int AddExtension(string sExtension);
	void UpdateData(bool bSave);

// Data
protected:
	CSysImageList	m_imgList;		// For looking up Icons
	CListViewCtrl	m_ctlList;		// List Control
	string_array m_asExtensions;	// Set of Extensions
	CPropertyBag& m_Data;			// Reference to Data 
	HWND m_hwndIgnore;				// Dialog Window to work with (set by class user)
};

#endif // !defined(AFX_IGNOREPROP_H__93425F11_BC15_11D3_82FF_005056D45AB0__INCLUDED_)