ReactOS  0.4.15-dev-1201-gb2cf5a4
CLayerUIPropPage Class Reference

#include <CLayerUIPropPage.hpp>

Inheritance diagram for CLayerUIPropPage:
Collaboration diagram for CLayerUIPropPage:

Public Types

enum  { IDD = IDD_ACPPAGESHEET }
 
- Public Types inherited from IShellExtInit
typedef IShellExtInitLPSHELLEXTINIT
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IShellPropSheetExt
enum  tagSHELLPROPSHEETEXTPAGEID { EXPPS_FILETYPES = 0x1 }
 
typedef UINT EXPPS
 

Public Member Functions

 CLayerUIPropPage ()
 
 ~CLayerUIPropPage ()
 
STDMETHODIMP Initialize (PCIDLIST_ABSOLUTE pidlFolder, LPDATAOBJECT pdtobj, HKEY hkeyProgID)
 
STDMETHODIMP AddPages (LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
 
STDMETHODIMP ReplacePage (UINT, LPFNADDPROPSHEETPAGE, LPARAM)
 
VOID OnPageAddRef ()
 
VOID OnPageRelease ()
 
HRESULT InitFile (PCWSTR Filename)
 
void UpdateControls ()
 
INT_PTR DisableControls ()
 
BOOL HasChanges () const
 
int OnSetActive ()
 
int OnApply ()
 
LRESULT OnInitDialog (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCtrlCommand (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnEditModes (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnClickNotify (INT uCode, LPNMHDR hdr, BOOL &bHandled)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IShellExtInit
HRESULT Initialize ([in] PCIDLIST_ABSOLUTE pidlFolder, [in] IDataObject *pdtobj, [in] HKEY hkeyProgID)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IShellPropSheetExt
HRESULT AddPages ([in] LPFNSVADDPROPSHEETPAGE pfnAddPage, [in] LPARAM lParam)
 
HRESULT ReplacePage ([in] EXPPS uPageID, [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith, [in] LPARAM lParam)
 

Public Attributes

CSimpleArray< CString > m_CustomLayers
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Protected Attributes

CString m_Filename
 
BOOL m_IsSfcProtected
 
BOOL m_AllowPermLayer
 
DWORD m_LayerQueryFlags
 
DWORD m_RegistryOSMode
 
DWORD m_OSMode
 
DWORD m_RegistryEnabledLayers
 
DWORD m_EnabledLayers
 
CSimpleArray< CString > m_RegistryCustomLayers
 

Additional Inherited Members

- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 

Detailed Description

Definition at line 10 of file CLayerUIPropPage.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 74 of file CLayerUIPropPage.hpp.

74 { IDD = IDD_ACPPAGESHEET };
#define IDD_ACPPAGESHEET
Definition: resource.h:3

Constructor & Destructor Documentation

◆ CLayerUIPropPage()

CLayerUIPropPage::CLayerUIPropPage ( )

Definition at line 110 of file CLayerUIPropPage.cpp.

113 , m_LayerQueryFlags(GPLK_USER) /* TODO: When do we read from HKLM? */
114 , m_RegistryOSMode(0)
115 , m_OSMode(0)
117 , m_EnabledLayers(0)
118 {
119  CComBSTR title;
120  title.LoadString(g_hModule, IDS_COMPAT_TITLE);
121  m_psp.pszTitle = title.Detach();
122  m_psp.dwFlags |= PSP_USETITLE;
123 }
#define IDS_COMPAT_TITLE
Definition: resource.h:24
HMODULE g_hModule
Definition: ACPPage.cpp:12
#define FALSE
Definition: types.h:117
#define PSP_USETITLE
Definition: prsht.h:26
#define GPLK_USER
static char title[]
Definition: ps.c:92

◆ ~CLayerUIPropPage()

CLayerUIPropPage::~CLayerUIPropPage ( )

Definition at line 125 of file CLayerUIPropPage.cpp.

126 {
127  CComBSTR title;
128  title.Attach((BSTR)m_psp.pszTitle);
129 }
OLECHAR * BSTR
Definition: compat.h:2152
static char title[]
Definition: ps.c:92

Member Function Documentation

◆ AddPages()

STDMETHODIMP CLayerUIPropPage::AddPages ( LPFNADDPROPSHEETPAGE  pfnAddPage,
LPARAM  lParam 
)
inline

Definition at line 28 of file CLayerUIPropPage.hpp.

29  {
30  HPROPSHEETPAGE hPage = Create();
31  if (hPage && !pfnAddPage(hPage, lParam))
33 
34  return S_OK;
35  }
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
Definition: propsheet.c:3144
_In_ BOOLEAN Create
Definition: pstypes.h:519
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define S_OK
Definition: intsafe.h:51
LPARAM lParam
Definition: combotst.c:139

◆ DisableControls()

INT_PTR CLayerUIPropPage::DisableControls ( )

Definition at line 364 of file CLayerUIPropPage.cpp.

365 {
368  for (size_t n = 0; g_Layers[n].Name; ++n)
371  return TRUE;
372 }
#define IDC_EDITCOMPATIBILITYMODES
Definition: resource.h:12
#define IDC_CHKRUNCOMPATIBILITY
Definition: resource.h:7
#define TRUE
Definition: types.h:120
GLdouble n
Definition: glext.h:7729
DWORD Id
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDC_COMPATIBILITYMODE
Definition: resource.h:8
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
static struct @299 g_Layers[]

Referenced by OnInitDialog().

◆ HasChanges()

BOOL CLayerUIPropPage::HasChanges ( ) const

Definition at line 290 of file CLayerUIPropPage.cpp.

291 {
293  return TRUE;
294 
295  if (m_RegistryOSMode != m_OSMode)
296  return TRUE;
297 
299  return TRUE;
300 
301  return FALSE;
302 }
#define TRUE
Definition: types.h:120
CSimpleArray< CString > m_CustomLayers
static BOOL ArrayEquals(const CSimpleArray< CString > &lhs, const CSimpleArray< CString > &rhs)
#define FALSE
Definition: types.h:117
CSimpleArray< CString > m_RegistryCustomLayers

Referenced by OnApply(), and UpdateControls().

◆ InitFile()

HRESULT CLayerUIPropPage::InitFile ( PCWSTR  Filename)

Definition at line 131 of file CLayerUIPropPage.cpp.

132 {
133  CString ExpandedFilename;
134  DWORD dwRequired = ExpandEnvironmentStringsW(Filename, NULL, 0);
135  if (dwRequired > 0)
136  {
137  LPWSTR Buffer = ExpandedFilename.GetBuffer(dwRequired);
138  DWORD dwReturned = ExpandEnvironmentStringsW(Filename, Buffer, dwRequired);
139  if (dwRequired == dwReturned)
140  {
141  ExpandedFilename.ReleaseBufferSetLength(dwReturned - 1);
142  ACDBG(L"Expanded '%s' => '%s'\r\n", Filename, (PCWSTR)ExpandedFilename);
143  }
144  else
145  {
146  ExpandedFilename.ReleaseBufferSetLength(0);
147  ExpandedFilename = Filename;
148  ACDBG(L"Failed during expansion '%s'\r\n", Filename);
149  }
150  }
151  else
152  {
153  ACDBG(L"Failed to expand '%s'\r\n", Filename);
154  ExpandedFilename = Filename;
155  }
156  PCWSTR pwszExt = PathFindExtensionW(ExpandedFilename);
157  if (!pwszExt)
158  {
159  ACDBG(L"Failed to find an extension: '%s'\r\n", (PCWSTR)ExpandedFilename);
160  return E_FAIL;
161  }
162  if (!wcsicmp(pwszExt, L".lnk"))
163  {
165  if (!GetExeFromLnk(ExpandedFilename, Buffer, _countof(Buffer)))
166  {
167  ACDBG(L"Failed to read link target from: '%s'\r\n", (PCWSTR)ExpandedFilename);
168  return E_FAIL;
169  }
170  if (!wcsicmp(Buffer, ExpandedFilename))
171  {
172  ACDBG(L"Link redirects to itself: '%s'\r\n", (PCWSTR)ExpandedFilename);
173  return E_FAIL;
174  }
175  return InitFile(Buffer);
176  }
177 
178  CString tmp;
179  if (tmp.GetEnvironmentVariable(L"SystemRoot"))
180  {
181  tmp += L"\\System32";
182  if (ExpandedFilename.GetLength() >= tmp.GetLength() &&
183  ExpandedFilename.Left(tmp.GetLength()).MakeLower() == tmp.MakeLower())
184  {
185  ACDBG(L"Ignoring System32: %s\r\n", (PCWSTR)ExpandedFilename);
186  return E_FAIL;
187  }
188  tmp.GetEnvironmentVariable(L"SystemRoot");
189  tmp += L"\\WinSxs";
190  if (ExpandedFilename.GetLength() >= tmp.GetLength() &&
191  ExpandedFilename.Left(tmp.GetLength()).MakeLower() == tmp.MakeLower())
192  {
193  ACDBG(L"Ignoring WinSxs: %s\r\n", (PCWSTR)ExpandedFilename);
194  return E_FAIL;
195  }
196  }
197 
198  for (size_t n = 0; g_AllowedExtensions[n]; ++n)
199  {
200  if (!wcsicmp(g_AllowedExtensions[n], pwszExt))
201  {
202  m_Filename = ExpandedFilename;
203  ACDBG(L"Got: %s\r\n", (PCWSTR)ExpandedFilename);
205  m_AllowPermLayer = AllowPermLayer(ExpandedFilename);
206  return S_OK;
207  }
208  }
209  ACDBG(L"Extension not included: '%s'\r\n", pwszExt);
210  return E_FAIL;
211 }
int GetLength() const
Definition: atlsimpstr.h:356
const uint16_t * PCWSTR
Definition: typedefs.h:57
BOOL WINAPI SfcIsFileProtected(HANDLE RpcHandle, LPCWSTR ProtFileName)
Definition: sfc_os.c:83
GLdouble n
Definition: glext.h:7729
BOOL WINAPI AllowPermLayer(PCWSTR path)
Definition: layer.c:320
#define E_FAIL
Definition: ddrawi.h:102
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:934
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:442
EXTERN_C BOOL WINAPI GetExeFromLnk(PCWSTR pszLnk, PWSTR pszExe, size_t cchSize)
Definition: ACPPage.cpp:86
HRESULT InitFile(PCWSTR Filename)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
void ReleaseBufferSetLength(_In_ int nNewLength)
Definition: atlsimpstr.h:366
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
#define wcsicmp
Definition: compat.h:15
BOOL GetEnvironmentVariable(_In_z_ PCXSTR pszVar)
Definition: cstringt.h:573
static const WCHAR L[]
Definition: oid.c:1250
#define S_OK
Definition: intsafe.h:51
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
#define ACDBG(fmt,...)
static const WCHAR * g_AllowedExtensions[]
WCHAR * LPWSTR
Definition: xmlstorage.h:184
CStringT Left(int nCount) const
Definition: cstringt.h:691
CStringT & MakeLower()
Definition: cstringt.h:589

Referenced by Initialize().

◆ Initialize()

STDMETHODIMP CLayerUIPropPage::Initialize ( PCIDLIST_ABSOLUTE  pidlFolder,
LPDATAOBJECT  pdtobj,
HKEY  hkeyProgID 
)

Definition at line 449 of file CLayerUIPropPage.cpp.

450 {
451  FORMATETC etc = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
452  STGMEDIUM stg;
453 
454  if (DisableShellext())
455  return E_ACCESSDENIED;
456 
457  HRESULT hr = pDataObj->GetData(&etc, &stg);
458  if (FAILED(hr))
459  {
460  ACDBG(L"Failed to retrieve Data from pDataObj.\r\n");
461  return E_INVALIDARG;
462  }
463  hr = E_FAIL;
464  HDROP hdrop = (HDROP)GlobalLock(stg.hGlobal);
465  if (hdrop)
466  {
467  UINT uNumFiles = DragQueryFileW(hdrop, 0xFFFFFFFF, NULL, 0);
468  if (uNumFiles == 1)
469  {
470  WCHAR szFile[MAX_PATH * 2];
471  if (DragQueryFileW(hdrop, 0, szFile, _countof(szFile)))
472  {
473  this->AddRef();
474  hr = InitFile(szFile);
475  }
476  else
477  {
478  ACDBG(L"Failed to query the file.\r\n");
479  }
480  }
481  else
482  {
483  ACDBG(L"Invalid number of files: %d\r\n", uNumFiles);
484  }
485  GlobalUnlock(stg.hGlobal);
486  }
487  else
488  {
489  ACDBG(L"Could not lock stg.hGlobal\r\n");
490  }
491  ReleaseStgMedium(&stg);
492  return hr;
493 }
#define E_ACCESSDENIED
Definition: winerror.h:2849
HRESULT hr
Definition: shlfolder.c:183
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
#define E_FAIL
Definition: ddrawi.h:102
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define CF_HDROP
Definition: constants.h:410
static BOOL DisableShellext()
HRESULT InitFile(PCWSTR Filename)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
ULONG AddRef()
static const WCHAR L[]
Definition: oid.c:1250
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
unsigned int UINT
Definition: ndis.h:50
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
#define ACDBG(fmt,...)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
Definition: shellole.c:627

◆ OnApply()

int CLayerUIPropPage::OnApply ( )

Definition at line 304 of file CLayerUIPropPage.cpp.

305 {
306  if (HasChanges())
307  {
309 
310  for (size_t n = 0; g_CompatModes[n].Name; ++n)
312 
313  for (size_t n = 0; g_Layers[n].Name; ++n)
314  {
316  }
317 
318  /* Disable all old values */
319  for (int j = 0; j < m_RegistryCustomLayers.GetSize(); j++)
320  {
322  }
323 
324  /* Enable all new values */
325  for (int j = 0; j < m_CustomLayers.GetSize(); j++)
326  {
328  }
329 
331  }
332 
333  return PSNRET_NOERROR;
334 }
const uint16_t * PCWSTR
Definition: typedefs.h:57
BOOL WINAPI SetPermLayerState(PCWSTR wszPath, PCWSTR wszLayer, DWORD dwFlags, BOOL bMachine, BOOL bEnable)
Definition: layer.c:467
#define TRUE
Definition: types.h:120
CSimpleArray< CString > m_CustomLayers
GLdouble n
Definition: glext.h:7729
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
CSimpleArray< CString > m_RegistryCustomLayers
#define GPLK_MACHINE
smooth NULL
Definition: ftsmooth.c:416
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define PSNRET_NOERROR
Definition: prsht.h:129
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
BOOL HasChanges() const
#define SHCNF_PATHW
Definition: shlobj.h:1764
static struct @299 g_Layers[]
static struct @298 g_CompatModes[]
#define SHCNE_UPDATEITEM
Definition: shlobj.h:1742
static PCWSTR BOOL bMachine
Definition: layerapi.c:34

◆ OnClickNotify()

LRESULT CLayerUIPropPage::OnClickNotify ( INT  uCode,
LPNMHDR  hdr,
BOOL bHandled 
)

Definition at line 413 of file CLayerUIPropPage.cpp.

414 {
415  if (hdr->idFrom == IDC_INFOLINK)
416  ShellExecute(NULL, L"open", L"https://reactos.org/forum/viewforum.php?f=4", NULL, NULL, SW_SHOW);
417  return 0;
418 }
char hdr[14]
Definition: iptest.cpp:33
#define ShellExecute
Definition: shellapi.h:691
smooth NULL
Definition: ftsmooth.c:416
#define IDC_INFOLINK
Definition: resource.h:13
#define SW_SHOW
Definition: winuser.h:769
static const WCHAR L[]
Definition: oid.c:1250

◆ OnCtrlCommand()

LRESULT CLayerUIPropPage::OnCtrlCommand ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 400 of file CLayerUIPropPage.cpp.

401 {
402  UpdateControls();
403  return 0;
404 }

◆ OnEditModes()

LRESULT CLayerUIPropPage::OnEditModes ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 406 of file CLayerUIPropPage.cpp.

407 {
408  if (ShowEditCompatModes(m_hWnd, this))
409  UpdateControls();
410  return 0;
411 }
BOOL ShowEditCompatModes(HWND hWnd, CLayerUIPropPage *page)

◆ OnInitDialog()

LRESULT CLayerUIPropPage::OnInitDialog ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 336 of file CLayerUIPropPage.cpp.

337 {
339  for (size_t n = 0; g_CompatModes[n].Display; ++n)
341  ComboBox_SetCurSel(cboMode, 4);
342 
343  CStringW explanation;
344  if (!m_AllowPermLayer)
345  {
347  DisableControls();
348  ACDBG(L"AllowPermLayer returned FALSE\r\n");
349  }
350  else if (m_IsSfcProtected)
351  {
353  DisableControls();
354  ACDBG(L"Protected OS file\r\n");
355  }
356  else
357  {
358  return TRUE;
359  }
360  SetDlgItemTextW(IDC_EXPLANATION, explanation);
361  return TRUE;
362 }
#define ComboBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:16
#define TRUE
Definition: types.h:120
#define IDS_FAILED_NETWORK
Definition: resource.h:25
GLdouble n
Definition: glext.h:7729
HMODULE g_hModule
Definition: ACPPage.cpp:12
#define IDS_FAILED_PROTECTED
Definition: resource.h:26
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define IDC_EXPLANATION
Definition: resource.h:6
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static const WCHAR L[]
Definition: oid.c:1250
#define IDC_COMPATIBILITYMODE
Definition: resource.h:8
#define ComboBox_SetCurSel(hwndCtl, index)
Definition: windowsx.h:41
#define ACDBG(fmt,...)
static struct @298 g_CompatModes[]
int Display
Definition: x11stubs.h:25
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:554

◆ OnPageAddRef()

VOID CLayerUIPropPage::OnPageAddRef ( )
inline

Definition at line 42 of file CLayerUIPropPage.hpp.

43  {
45  }
LONG g_ModuleRefCnt
Definition: ACPPage.cpp:13
#define InterlockedIncrement
Definition: armddk.h:53

◆ OnPageRelease()

VOID CLayerUIPropPage::OnPageRelease ( )
inline

Definition at line 47 of file CLayerUIPropPage.hpp.

48  {
50  }
LONG g_ModuleRefCnt
Definition: ACPPage.cpp:13
#define InterlockedDecrement
Definition: armddk.h:52

◆ OnSetActive()

int CLayerUIPropPage::OnSetActive ( )

Definition at line 256 of file CLayerUIPropPage.cpp.

257 {
260 
261  for (size_t n = 0; g_Layers[n].Name; ++n)
263 
265 
266  if (m_RegistryOSMode)
268 
270 
271  UpdateControls();
272 
273  return 0;
274 }
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDC_CHKRUNCOMPATIBILITY
Definition: resource.h:7
CSimpleArray< CString > m_CustomLayers
GLdouble n
Definition: glext.h:7729
DWORD Id
CSimpleArray< CString > m_RegistryCustomLayers
static BOOL GetLayerInfo(PCWSTR Filename, DWORD QueryFlags, PDWORD OSMode, PDWORD Enabledlayers, CSimpleArray< CString > &customLayers)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDC_COMPATIBILITYMODE
Definition: resource.h:8
#define BST_UNCHECKED
Definition: winuser.h:199
#define ComboBox_SetCurSel(hwndCtl, index)
Definition: windowsx.h:41
static struct @299 g_Layers[]
#define BST_CHECKED
Definition: winuser.h:197

◆ ReplacePage()

STDMETHODIMP CLayerUIPropPage::ReplacePage ( UINT  ,
LPFNADDPROPSHEETPAGE  ,
LPARAM   
)
inline

Definition at line 37 of file CLayerUIPropPage.hpp.

38  {
39  return E_NOTIMPL;
40  }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ UpdateControls()

void CLayerUIPropPage::UpdateControls ( )

Definition at line 374 of file CLayerUIPropPage.cpp.

375 {
376  m_OSMode = 0, m_EnabledLayers = 0;
378  if (ModeEnabled)
381 
382  for (size_t n = 0; g_Layers[n].Name; ++n)
383  {
386  }
387 
388  CStringW customLayers;
389  for (int j = 0; j < m_CustomLayers.GetSize(); ++j)
390  {
391  if (j > 0)
392  customLayers += L", ";
393  customLayers += m_CustomLayers[j];
394  }
395  SetDlgItemTextW(IDC_ENABLED_LAYERS, customLayers);
396 
397  SetModified(HasChanges());
398 }
#define IDC_CHKRUNCOMPATIBILITY
Definition: resource.h:7
CSimpleArray< CString > m_CustomLayers
GLdouble n
Definition: glext.h:7729
#define ComboBox_GetCurSel(hwndCtl)
Definition: windowsx.h:24
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
DWORD Id
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define SW_SHOW
Definition: winuser.h:769
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static const WCHAR L[]
Definition: oid.c:1250
#define IDC_COMPATIBILITYMODE
Definition: resource.h:8
BOOL HasChanges() const
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
static struct @299 g_Layers[]
#define IDC_ENABLED_LAYERS
Definition: resource.h:19

Referenced by OnCtrlCommand(), OnEditModes(), and OnSetActive().

Member Data Documentation

◆ m_AllowPermLayer

BOOL CLayerUIPropPage::m_AllowPermLayer
protected

Definition at line 67 of file CLayerUIPropPage.hpp.

Referenced by InitFile(), and OnInitDialog().

◆ m_CustomLayers

CSimpleArray<CString> CLayerUIPropPage::m_CustomLayers

◆ m_EnabledLayers

DWORD CLayerUIPropPage::m_EnabledLayers
protected

Definition at line 70 of file CLayerUIPropPage.hpp.

Referenced by HasChanges(), OnApply(), and UpdateControls().

◆ m_Filename

CString CLayerUIPropPage::m_Filename
protected

Definition at line 65 of file CLayerUIPropPage.hpp.

Referenced by InitFile(), OnApply(), and OnSetActive().

◆ m_IsSfcProtected

BOOL CLayerUIPropPage::m_IsSfcProtected
protected

Definition at line 66 of file CLayerUIPropPage.hpp.

Referenced by InitFile(), and OnInitDialog().

◆ m_LayerQueryFlags

DWORD CLayerUIPropPage::m_LayerQueryFlags
protected

Definition at line 68 of file CLayerUIPropPage.hpp.

Referenced by OnApply(), and OnSetActive().

◆ m_OSMode

DWORD CLayerUIPropPage::m_OSMode
protected

Definition at line 69 of file CLayerUIPropPage.hpp.

Referenced by HasChanges(), OnApply(), and UpdateControls().

◆ m_RegistryCustomLayers

CSimpleArray<CString> CLayerUIPropPage::m_RegistryCustomLayers
protected

Definition at line 71 of file CLayerUIPropPage.hpp.

Referenced by HasChanges(), OnApply(), and OnSetActive().

◆ m_RegistryEnabledLayers

DWORD CLayerUIPropPage::m_RegistryEnabledLayers
protected

Definition at line 70 of file CLayerUIPropPage.hpp.

Referenced by HasChanges(), and OnSetActive().

◆ m_RegistryOSMode

DWORD CLayerUIPropPage::m_RegistryOSMode
protected

Definition at line 69 of file CLayerUIPropPage.hpp.

Referenced by HasChanges(), and OnSetActive().


The documentation for this class was generated from the following files: