xref: /aoo41x/main/shell/inc/internal/propsheets.hxx (revision 67e470da)
1*ed2f6d3bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ed2f6d3bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ed2f6d3bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ed2f6d3bSAndrew Rist  * distributed with this work for additional information
6*ed2f6d3bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ed2f6d3bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ed2f6d3bSAndrew Rist  * "License"); you may not use this file except in compliance
9*ed2f6d3bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ed2f6d3bSAndrew Rist  *
11*ed2f6d3bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ed2f6d3bSAndrew Rist  *
13*ed2f6d3bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ed2f6d3bSAndrew Rist  * software distributed under the License is distributed on an
15*ed2f6d3bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ed2f6d3bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ed2f6d3bSAndrew Rist  * specific language governing permissions and limitations
18*ed2f6d3bSAndrew Rist  * under the License.
19*ed2f6d3bSAndrew Rist  *
20*ed2f6d3bSAndrew Rist  *************************************************************/
21*ed2f6d3bSAndrew Rist 
22*ed2f6d3bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef PROPSHEETS_HXX_INCLUDED
25cdf0e10cSrcweir #define PROPSHEETS_HXX_INCLUDED
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "internal/metainforeader.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #if defined _MSC_VER
30cdf0e10cSrcweir #pragma warning(push, 1)
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #include <shlobj.h>
33cdf0e10cSrcweir #if defined _MSC_VER
34cdf0e10cSrcweir #pragma warning(pop)
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir #include <string>
37cdf0e10cSrcweir #include <memory>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir class CPropertySheet : public IShellExtInit, public IShellPropSheetExt
40cdf0e10cSrcweir {
41cdf0e10cSrcweir public:
42cdf0e10cSrcweir 	CPropertySheet(long RefCnt = 1);
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 	virtual ~CPropertySheet();
45cdf0e10cSrcweir 
46cdf0e10cSrcweir 	//-----------------------------
47cdf0e10cSrcweir 	// IUnknown methods
48cdf0e10cSrcweir 	//-----------------------------
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 	virtual HRESULT STDMETHODCALLTYPE QueryInterface(
51cdf0e10cSrcweir             REFIID riid,
52cdf0e10cSrcweir             void __RPC_FAR *__RPC_FAR *ppvObject);
53cdf0e10cSrcweir 
54cdf0e10cSrcweir     virtual ULONG STDMETHODCALLTYPE AddRef( void);
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     virtual ULONG STDMETHODCALLTYPE Release( void);
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 	//-----------------------------
59cdf0e10cSrcweir 	// IShellExtInit
60cdf0e10cSrcweir 	//-----------------------------
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     virtual HRESULT STDMETHODCALLTYPE Initialize(
63cdf0e10cSrcweir 		LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID);
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 	//-----------------------------
66cdf0e10cSrcweir 	// IShellPropSheetExt
67cdf0e10cSrcweir 	//-----------------------------
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     virtual HRESULT STDMETHODCALLTYPE ReplacePage(
72cdf0e10cSrcweir 		UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam);
73cdf0e10cSrcweir 
74cdf0e10cSrcweir private:
75cdf0e10cSrcweir 	// Windows callback functions
76cdf0e10cSrcweir 	static UINT CALLBACK PropPageSummaryCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
77cdf0e10cSrcweir 	static BOOL CALLBACK PropPageSummaryProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam);
78cdf0e10cSrcweir 	static BOOL CALLBACK PropPageStatisticsProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam);
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	// Helper functions
82cdf0e10cSrcweir 	void InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE lppsp);
83cdf0e10cSrcweir 	void InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE lppsp);
84cdf0e10cSrcweir 
85cdf0e10cSrcweir private:
86cdf0e10cSrcweir 	long m_RefCnt;
87cdf0e10cSrcweir 	char m_szFileName[MAX_PATH];
88cdf0e10cSrcweir };
89cdf0e10cSrcweir 
90cdf0e10cSrcweir #endif
91