ReactOS  0.4.14-dev-52-g6116262
deskmon.c
Go to the documentation of this file.
1 #include "precomp.h"
2 
3 #include <tchar.h>
4 
5 #define NDEBUG
6 #include <debug.h>
7 
8 #include "resource.h"
9 
11 
12 #ifdef UNICODE
14 #define FUNC_DEVICEPROPERTIES "DevicePropertiesW"
15 #else
17 #define FUNC_DEVICEPROPERTIES "DevicePropertiesA"
18 #endif
19 
20 static LPTSTR
22 {
23  /* FIXME: Implement, allocate returned string with LocalAlloc! */
24  return NULL;
25 }
26 
27 static VOID
29 {
30  HMODULE hDevMgr;
31  PDEVICEPROPERTIES pDeviceProperties;
32  LPTSTR lpDevInstID;
33 
34  if (This->SelMonitor != NULL)
35  {
36  lpDevInstID = GetMonitorDevInstID(This->SelMonitor->dd.DeviceID);
37  if (lpDevInstID != NULL)
38  {
39  hDevMgr = LoadLibrary(TEXT("devmgr.dll"));
40  if (hDevMgr != NULL)
41  {
42  pDeviceProperties = (PDEVICEPROPERTIES)GetProcAddress(hDevMgr,
44  if (pDeviceProperties != NULL)
45  {
46  pDeviceProperties(This->hwndDlg,
47  NULL,
48  This->SelMonitor->dd.DeviceID,
49  FALSE);
50  }
51 
52  FreeLibrary(hDevMgr);
53  }
54 
55  LocalFree((HLOCAL)lpDevInstID);
56  }
57  }
58 }
59 
60 static VOID
62 {
63  INT i;
64 
65  if (This->dwMonitorCount > 1)
66  {
67  This->SelMonitor = NULL;
68 
69  i = (INT)SendDlgItemMessage(This->hwndDlg,
72  0,
73  0);
74  if (i >= 0)
75  {
76  This->SelMonitor = (PDESKMONINFO)SendDlgItemMessage(This->hwndDlg,
79  (WPARAM)i,
80  0);
81  }
82  }
83  else
84  This->SelMonitor = This->Monitors;
85 
86  EnableWindow(GetDlgItem(This->hwndDlg,
88  This->SelMonitor != NULL);
89 }
90 
91 static VOID
93 {
94  EnableWindow(GetDlgItem(This->hwndDlg,
96  This->bModesPruned && !This->bKeyIsReadOnly);
97  CheckDlgButton(This->hwndDlg,
99  (This->bModesPruned && This->bPruningOn) ? BST_CHECKED : BST_UNCHECKED);
100 }
101 
102 static VOID
104 {
105  BOOL bModesPruned = FALSE, bKeyIsReadOnly = FALSE, bPruningOn = FALSE;
106 
107  if (This->DeskExtInterface != NULL)
108  {
109  This->DeskExtInterface->GetPruningMode(This->DeskExtInterface->Context,
110  &bModesPruned,
111  &bKeyIsReadOnly,
112  &bPruningOn);
113  }
114 
115  /* Check the boolean values against zero before assigning it to the bitfields! */
116  This->bModesPruned = (bModesPruned != FALSE);
117  This->bKeyIsReadOnly = (bKeyIsReadOnly != FALSE);
118  This->bPruningOn = (bPruningOn != FALSE);
119 
121 }
122 
123 static VOID
125 {
126  PDEVMODEW lpCurrentMode, lpMode;
127  TCHAR szBuffer[64];
128  DWORD dwIndex;
129  INT i;
130  BOOL bHasDef = FALSE;
131  BOOL bAdded = FALSE;
132 
133  /* Fill the refresh rate combo box */
134  SendDlgItemMessage(This->hwndDlg,
137  0,
138  0);
139 
140  lpCurrentMode = This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context);
141  dwIndex = 0;
142 
143  do
144  {
145  lpMode = This->DeskExtInterface->EnumAllModes(This->DeskExtInterface->Context,
146  dwIndex++);
147  if (lpMode != NULL &&
148  lpMode->dmBitsPerPel == lpCurrentMode->dmBitsPerPel &&
149  lpMode->dmPelsWidth == lpCurrentMode->dmPelsWidth &&
150  lpMode->dmPelsHeight == lpCurrentMode->dmPelsHeight)
151  {
152  /* We're only interested in refresh rates for the current resolution and color depth */
153 
154  if (lpMode->dmDisplayFrequency <= 1)
155  {
156  /* Default hardware frequency */
157  if (bHasDef)
158  continue;
159 
160  bHasDef = TRUE;
161 
162  if (!LoadString(hInstance,
164  szBuffer,
165  sizeof(szBuffer) / sizeof(szBuffer[0])))
166  {
167  szBuffer[0] = TEXT('\0');
168  }
169  }
170  else
171  {
172  TCHAR szFmt[64];
173 
174  if (!LoadString(hInstance,
175  IDS_FREQFMT,
176  szFmt,
177  sizeof(szFmt) / sizeof(szFmt[0])))
178  {
179  szFmt[0] = TEXT('\0');
180  }
181 
182  _sntprintf(szBuffer,
183  sizeof(szBuffer) / sizeof(szBuffer[0]),
184  szFmt,
185  lpMode->dmDisplayFrequency);
186  }
187 
188  i = (INT)SendDlgItemMessage(This->hwndDlg,
190  CB_ADDSTRING,
191  0,
192  (LPARAM)szBuffer);
193  if (i >= 0)
194  {
195  bAdded = TRUE;
196 
197  SendDlgItemMessage(This->hwndDlg,
200  (WPARAM)i,
201  (LPARAM)lpMode);
202 
203  if (lpMode->dmDisplayFrequency == lpCurrentMode->dmDisplayFrequency)
204  {
205  SendDlgItemMessage(This->hwndDlg,
207  CB_SETCURSEL,
208  (WPARAM)i,
209  0);
210  }
211  }
212  }
213 
214  } while (lpMode != NULL);
215 
216  EnableWindow(GetDlgItem(This->hwndDlg,
218  bAdded);
219  EnableWindow(GetDlgItem(This->hwndDlg,
221  bAdded);
222  EnableWindow(GetDlgItem(This->hwndDlg,
224  bAdded);
225 
227 }
228 
229 static VOID
231 {
232  PDESKMONINFO pmi, pminext, *pmilink;
233  DISPLAY_DEVICE dd;
234  BOOL bRet;
235  INT i;
236  DWORD dwIndex;
237 
238  /* Free all allocated monitors */
239  pmi = This->Monitors;
240  This->Monitors = NULL;
241  while (pmi != NULL)
242  {
243  pminext = pmi->Next;
244  LocalFree((HLOCAL)pmi);
245  pmi = pminext;
246  }
247 
248  This->SelMonitor = NULL;
249  This->dwMonitorCount = 0;
250 
251  if (This->lpDisplayDevice != NULL)
252  LocalFree((HLOCAL)This->lpDisplayDevice);
253 
254  This->lpDisplayDevice = QueryDeskCplString(This->pdtobj,
256 
257  if (This->DeskExtInterface != NULL)
258  {
259  if (This->lpDisplayDevice != NULL)
260  {
261  /* Enumerate all monitors */
262  dwIndex = 0;
263  pmilink = &This->Monitors;
264 
265  do
266  {
267  dd.cb = sizeof(dd);
268  bRet = EnumDisplayDevices(This->lpDisplayDevice,
269  dwIndex++,
270  &dd,
271  0);
272  if (bRet)
273  {
274  pmi = LocalAlloc(LMEM_FIXED,
275  sizeof(*pmi));
276  if (pmi != NULL)
277  {
278  CopyMemory(&pmi->dd,
279  &dd,
280  sizeof(dd));
281  pmi->Next = NULL;
282  *pmilink = pmi;
283  pmilink = &pmi->Next;
284 
285  This->dwMonitorCount++;
286  }
287  }
288  } while (bRet);
289  }
290 
291  This->lpDevModeOnInit = This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context);
292  }
293  else
294  This->lpDevModeOnInit = NULL;
295 
296  This->lpSelDevMode = This->lpDevModeOnInit;
297 
298  /* Setup the UI depending on how many monitors are attached */
299  if (This->dwMonitorCount == 0)
300  {
301  LPTSTR lpMonitorName;
302 
303  /* This is a fallback, let's hope that desk.cpl can provide us with a monitor name */
304  lpMonitorName = QueryDeskCplString(This->pdtobj,
306 
307  SetDlgItemText(This->hwndDlg,
309  lpMonitorName);
310 
311  if (lpMonitorName != NULL)
312  LocalFree((HLOCAL)lpMonitorName);
313  }
314  else if (This->dwMonitorCount == 1)
315  {
316  This->SelMonitor = This->Monitors;
317  SetDlgItemText(This->hwndDlg,
319  This->Monitors->dd.DeviceString);
320  }
321  else
322  {
323  SendDlgItemMessage(This->hwndDlg,
326  0,
327  0);
328 
329  pmi = This->Monitors;
330  while (pmi != NULL)
331  {
332  i = (INT)SendDlgItemMessage(This->hwndDlg,
334  LB_ADDSTRING,
335  0,
336  (LPARAM)pmi->dd.DeviceString);
337  if (i >= 0)
338  {
339  SendDlgItemMessage(This->hwndDlg,
342  (WPARAM)i,
343  (LPARAM)pmi);
344 
345  if (This->SelMonitor == NULL)
346  {
347  SendDlgItemMessage(This->hwndDlg,
349  LB_SETCURSEL,
350  (WPARAM)i,
351  0);
352 
353  This->SelMonitor = pmi;
354  }
355  }
356 
357  pmi = pmi->Next;
358  }
359  }
360 
361  /* Show/Hide controls */
362  ShowWindow(GetDlgItem(This->hwndDlg,
364  (This->dwMonitorCount <= 1 ? SW_SHOW : SW_HIDE));
365  ShowWindow(GetDlgItem(This->hwndDlg,
367  (This->dwMonitorCount > 1 ? SW_SHOW : SW_HIDE));
368 
371 }
372 
373 static VOID
375 {
376  BOOL bPruningOn;
377 
378  if (This->DeskExtInterface != NULL && This->bModesPruned && !This->bKeyIsReadOnly)
379  {
380  bPruningOn = IsDlgButtonChecked(This->hwndDlg,
382 
383  if (bPruningOn != This->bPruningOn)
384  {
385  /* Tell desk.cpl to turn on/off pruning mode */
386  This->bPruningOn = bPruningOn;
387  This->DeskExtInterface->SetPruningMode(This->DeskExtInterface->Context,
388  bPruningOn);
389 
390  /* Fill the refresh rate combobox again, we now receive a filtered
391  or unfiltered device mode list from desk.cpl (depending on whether
392  pruning is active or not) */
394 
396  This->hwndDlg);
397  }
398  }
399 }
400 
401 static VOID
403 {
404  PDEVMODEW lpCurrentDevMode;
405  INT i;
406 
407  if (This->DeskExtInterface != NULL)
408  {
409  i = (INT)SendDlgItemMessage(This->hwndDlg,
411  CB_GETCURSEL,
412  0,
413  0);
414  if (i >= 0)
415  {
416  lpCurrentDevMode = This->lpSelDevMode;
417  This->lpSelDevMode = (PDEVMODEW)SendDlgItemMessage(This->hwndDlg,
420  (WPARAM)i,
421  0);
422 
423  if (This->lpSelDevMode != NULL && This->lpSelDevMode != lpCurrentDevMode)
424  {
425  This->DeskExtInterface->SetCurrentMode(This->DeskExtInterface->Context,
426  This->lpSelDevMode);
427 
429 
431  This->hwndDlg);
432  }
433  }
434  }
435 }
436 
437 static LONG
439 {
440  LONG lChangeRet;
441 
442  if (This->DeskExtInterface != NULL)
443  {
444  /* Change the display settings through desk.cpl */
445  lChangeRet = DeskCplExtDisplaySaveSettings(This->DeskExtInterface,
446  This->hwndDlg);
447  if (lChangeRet == DISP_CHANGE_SUCCESSFUL)
448  {
449  /* Save the new mode */
450  This->lpDevModeOnInit = This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context);
451  This->lpSelDevMode = This->lpDevModeOnInit;
452  return PSNRET_NOERROR;
453  }
454  else if (lChangeRet == DISP_CHANGE_RESTART)
455  {
456  /* Notify desk.cpl that the user needs to reboot */
458  return PSNRET_NOERROR;
459  }
460  }
461 
463 
465 }
466 
467 static VOID
469 {
470  if (This->DeskExtInterface != NULL && This->lpDevModeOnInit != NULL)
471  {
472  This->DeskExtInterface->SetCurrentMode(This->DeskExtInterface->Context,
473  This->lpDevModeOnInit);
474  }
475 }
476 
477 static INT_PTR CALLBACK
479  UINT uMsg,
480  WPARAM wParam,
481  LPARAM lParam)
482 {
484  INT_PTR Ret = 0;
485 
486  if (uMsg != WM_INITDIALOG)
487  {
489  }
490 
491  switch (uMsg)
492  {
493  case WM_INITDIALOG:
495  This->hwndDlg = hwndDlg;
497 
499  Ret = TRUE;
500  break;
501 
502  case WM_COMMAND:
503  switch (LOWORD(wParam))
504  {
507  break;
508 
509  case IDC_MONITORLIST:
510  if (HIWORD(wParam) == LBN_SELCHANGE)
512  break;
513 
514  case IDC_PRUNINGCHECK:
515  if (HIWORD(wParam) == BN_CLICKED)
517  break;
518 
519  case IDC_REFRESHRATE:
520  if (HIWORD(wParam) == CBN_SELCHANGE)
522  break;
523  }
524  break;
525 
526  case WM_NOTIFY:
527  {
528  NMHDR *nmh = (NMHDR *)lParam;
529 
530  switch (nmh->code)
531  {
532  case PSN_APPLY:
533  {
534  SetWindowLongPtr(hwndDlg,
537  break;
538  }
539 
540  case PSN_RESET:
542  break;
543 
544  case PSN_SETACTIVE:
546  break;
547  }
548  break;
549  }
550  }
551 
552  return Ret;
553 }
554 
555 static VOID
557 {
558  PDESKMONINFO pmi, pminext;
559 
560  if (This->pdtobj != NULL)
561  {
562  IDataObject_Release(This->pdtobj);
563  This->pdtobj = NULL;
564  }
565 
566  if (This->DeskExtInterface != NULL)
567  {
568  LocalFree((HLOCAL)This->DeskExtInterface);
569  This->DeskExtInterface = NULL;
570  }
571 
572  if (This->lpDisplayDevice != NULL)
573  {
574  LocalFree((HLOCAL)This->lpDisplayDevice);
575  This->lpDisplayDevice = NULL;
576  }
577 
578  /* Free all monitors */
579  pmi = This->Monitors;
580  This->Monitors = NULL;
581  while (pmi != NULL)
582  {
583  pminext = pmi->Next;
584  LocalFree((HLOCAL)pmi);
585  pmi = pminext;
586  }
587 }
588 
589 ULONG
591 {
592  ULONG ret;
593 
595  if (ret == 1)
597 
598  return ret;
599 }
600 
601 ULONG
603 {
604  ULONG ret;
605 
607  if (ret == 0)
608  {
611 
613  0,
614  This);
615  }
616 
617  return ret;
618 }
619 
622  REFIID iid,
623  PVOID *pvObject)
624 {
625  *pvObject = NULL;
626 
627  if (IsEqualIID(iid,
628  &IID_IShellPropSheetExt) ||
629  IsEqualIID(iid,
630  &IID_IUnknown))
631  {
633  }
634  else if (IsEqualIID(iid,
635  &IID_IShellExtInit))
636  {
637  *pvObject = impl_to_interface(This, IShellExtInit);
638  }
639  else if (IsEqualIID(iid,
641  {
642  *pvObject = impl_to_interface(This, IClassFactory);
643  }
644  else
645  {
646  DPRINT1("IDeskMonitor::QueryInterface(%p,%p): E_NOINTERFACE\n", iid, pvObject);
647  return E_NOINTERFACE;
648  }
649 
651  return S_OK;
652 }
653 
654 HRESULT
656  LPCITEMIDLIST pidlFolder,
657  IDataObject *pdtobj,
658  HKEY hkeyProgID)
659 {
660  DPRINT1("IDeskMonitor::Initialize(%p,%p,%p)\n", pidlFolder, pdtobj, hkeyProgID);
661 
662  if (pdtobj != NULL)
663  {
664  IDataObject_AddRef(pdtobj);
665  This->pdtobj = pdtobj;
666 
667  /* Get a copy of the desk.cpl extension interface */
668  This->DeskExtInterface = QueryDeskCplExtInterface(This->pdtobj);
669  if (This->DeskExtInterface != NULL)
670  return S_OK;
671  }
672 
673  return S_FALSE;
674 }
675 
676 HRESULT
678  LPFNADDPROPSHEETPAGE pfnAddPage,
679  LPARAM lParam)
680 {
681  HPROPSHEETPAGE hpsp;
682  PROPSHEETPAGE psp;
683 
684  DPRINT1("IDeskMonitor::AddPages(%p,%p)\n", pfnAddPage, lParam);
685 
686  psp.dwSize = sizeof(psp);
687  psp.dwFlags = PSP_DEFAULT;
688  psp.hInstance = hInstance;
689  psp.pszTemplate = MAKEINTRESOURCE(IDD_MONITOR);
690  psp.pfnDlgProc = MonitorDlgProc;
691  psp.lParam = (LPARAM)This;
692 
693  hpsp = CreatePropertySheetPage(&psp);
694  if (hpsp != NULL && pfnAddPage(hpsp, lParam))
695  return S_OK;
696 
697  return S_FALSE;
698 }
699 
700 HRESULT
702  EXPPS uPageID,
703  LPFNADDPROPSHEETPAGE pfnReplacePage,
704  LPARAM lParam)
705 {
706  DPRINT1("IDeskMonitor::ReplacePage(%u,%p,%p)\n", uPageID, pfnReplacePage, lParam);
707  return E_NOTIMPL;
708 }
709 
710 HRESULT
712  LPVOID *ppv)
713 {
715  HRESULT hRet = E_OUTOFMEMORY;
716 
717  DPRINT1("IDeskMonitor::Constructor(%p,%p)\n", riid, ppv);
718 
720  0,
721  sizeof(*This));
722  if (This != NULL)
723  {
725  sizeof(*This));
726 
728 
730  riid,
731  ppv);
732  if (!SUCCEEDED(hRet))
734  }
735 
736  return hRet;
737 }
738 
739 BOOL WINAPI
741  DWORD dwReason,
743 {
744  switch (dwReason)
745  {
746  case DLL_PROCESS_ATTACH:
747  hInstance = hinstDLL;
749  break;
750  }
751 
752  return TRUE;
753 }
HRESULT IDeskMonitor_Initialize(PDESKMONITOR This, LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
Definition: deskmon.c:655
#define LB_SETCURSEL
Definition: winuser.h:2045
#define CB_SETITEMDATA
Definition: winuser.h:1948
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDC_PRUNINGCHECK
Definition: resource.h:11
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
struct _DESKMONINFO * Next
Definition: deskmon.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define IDS_USEDEFFRQUENCY
Definition: resource.h:14
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
struct _devicemodeW * PDEVMODEW
DECLSPEC_HIDDEN LONG dll_refs
Definition: devenum_main.c:28
#define LoadLibrary
Definition: winbase.h:3679
static INT_PTR CALLBACK MonitorDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: deskmon.c:478
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define DISP_CHANGE_RESTART
Definition: winuser.h:191
#define LB_ADDSTRING
Definition: winuser.h:2013
static VOID IDeskMonitor_Destroy(PDESKMONITOR This)
Definition: deskmon.c:556
CHAR DeviceString[128]
Definition: wingdi.h:2806
static VOID UpdatePruningSelection(PDESKMONITOR This)
Definition: deskmon.c:374
#define SW_HIDE
Definition: winuser.h:762
REFIID riid
Definition: precomp.h:44
#define LB_GETITEMDATA
Definition: winuser.h:2023
#define CB_GETITEMDATA
Definition: winuser.h:1932
static __inline PDESK_EXT_INTERFACE QueryDeskCplExtInterface(IDataObject *pdo)
Definition: deskcplx.h:48
#define PropSheet_RestartWindows(d)
Definition: prsht.h:334
#define INT
Definition: polytest.cpp:20
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define CALLBACK
Definition: compat.h:27
REFIID LPVOID * ppv
Definition: atlbase.h:39
HANDLE HWND
Definition: compat.h:13
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
static VOID ShowMonitorProperties(PDESKMONITOR This)
Definition: deskmon.c:28
#define ZeroMemory
Definition: winbase.h:1635
static VOID UpdateRefreshRateSelection(PDESKMONITOR This)
Definition: deskmon.c:402
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
Definition: prsht.h:309
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
UINT_PTR WPARAM
Definition: windef.h:207
DISPLAY_DEVICE dd
Definition: deskmon.h:5
#define SendDlgItemMessage
Definition: winuser.h:5743
static LPTSTR GetMonitorDevInstID(LPCTSTR lpDeviceID)
Definition: deskmon.c:21
#define PSN_APPLY
Definition: prsht.h:117
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
DWORD dmBitsPerPel
Definition: wingdi.h:1642
int32_t INT_PTR
Definition: typedefs.h:62
static __inline LONG DeskCplExtDisplaySaveSettings(PDESK_EXT_INTERFACE DeskExtInterface, HWND hwndDlg)
Definition: deskcplx.h:122
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: deskmon.c:740
#define BOOL
Definition: nt_native.h:43
#define LBN_SELCHANGE
Definition: winuser.h:2057
#define PSN_SETACTIVE
Definition: prsht.h:115
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
#define CB_GETCURSEL
Definition: winuser.h:1925
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
static IN DWORD IN LPVOID lpvReserved
#define DWLP_MSGRESULT
Definition: winuser.h:864
HRESULT STDMETHODCALLTYPE IDeskMonitor_QueryInterface(PDESKMONITOR This, REFIID iid, PVOID *pvObject)
Definition: deskmon.c:621
static VOID UpdateMonitorSelection(PDESKMONITOR This)
Definition: deskmon.c:61
UINT code
Definition: winuser.h:3133
DWORD dwReason
Definition: misc.cpp:154
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 i
Definition: glfuncs.h:248
#define LB_RESETCONTENT
Definition: winuser.h:2037
struct _DESKMONITOR * PDESKMONITOR
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HRESULT IDeskMonitor_ReplacePage(PDESKMONITOR This, EXPPS uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
Definition: deskmon.c:701
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define IDC_REFRESHRATE
Definition: resource.h:10
#define S_FALSE
Definition: winerror.h:2357
static VOID UpdatePruningControls(PDESKMONITOR This)
Definition: deskmon.c:92
#define CB_ADDSTRING
Definition: winuser.h:1918
#define PSNRET_INVALID_NOCHANGEPAGE
Definition: prsht.h:131
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
HRESULT IDeskMonitor_Constructor(REFIID riid, LPVOID *ppv)
Definition: deskmon.c:711
const char * LPCSTR
Definition: xmlstorage.h:183
#define SW_SHOW
Definition: winuser.h:769
#define CB_RESETCONTENT
Definition: winuser.h:1941
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define CreatePropertySheetPage
Definition: prsht.h:381
#define IDS_MONITORSETTINGSGROUP
Definition: resource.h:8
#define LMEM_FIXED
Definition: winbase.h:349
char TCHAR
Definition: xmlstorage.h:189
#define PSP_DEFAULT
Definition: prsht.h:22
#define FreeLibrary(x)
Definition: compat.h:405
static VOID ResetMonitorChanges(PDESKMONITOR This)
Definition: deskmon.c:468
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define PropSheet_Changed(d, w)
Definition: prsht.h:326
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
static VOID UpdateRefreshFrequencyList(PDESKMONITOR This)
Definition: deskmon.c:124
#define WINAPI
Definition: msvc.h:8
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
#define CopyMemory
Definition: winbase.h:1633
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define FUNC_DEVICEPROPERTIES
Definition: deskmon.c:17
#define BN_CLICKED
Definition: winuser.h:1907
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG IDeskMonitor_Release(PDESKMONITOR This)
Definition: deskmon.c:602
#define LPCPROPSHEETPAGE
Definition: prsht.h:373
#define LB_SETITEMDATA
Definition: winuser.h:2047
#define SetDlgItemText
Definition: winuser.h:5750
static VOID GetPruningSettings(PDESKMONITOR This)
Definition: deskmon.c:103
DWORD dmPelsWidth
Definition: wingdi.h:1643
#define PSNRET_NOERROR
Definition: prsht.h:129
int ret
#define IDC_MONITORPROPERTIES
Definition: resource.h:7
#define InterlockedDecrement
Definition: armddk.h:52
VOID IDeskMonitor_InitIface(PDESKMONITOR This)
Definition: shxiface.c:176
#define DWLP_USER
Definition: winuser.h:866
#define _sntprintf
Definition: xmlstorage.h:201
static VOID InitMonitorDialog(PDESKMONITOR This)
Definition: deskmon.c:230
#define CB_SETCURSEL
Definition: winuser.h:1943
#define WM_COMMAND
Definition: winuser.h:1722
static HINSTANCE hInstance
Definition: deskmon.c:10
#define IDS_REFRESHRATELABEL
Definition: resource.h:9
#define BST_UNCHECKED
Definition: winuser.h:199
#define RegisterClipboardFormat
Definition: winuser.h:5739
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
ULONG IDeskMonitor_AddRef(PDESKMONITOR This)
Definition: deskmon.c:590
static LONG ApplyMonitorChanges(PDESKMONITOR This)
Definition: deskmon.c:438
DWORD dmDisplayFrequency
Definition: wingdi.h:1649
HWND WINAPI GetParent(_In_ HWND)
#define S_OK
Definition: intsafe.h:59
#define TEXT(s)
Definition: k32.h:26
#define InterlockedIncrement
Definition: armddk.h:53
#define impl_to_interface(impl, iface)
Definition: dwnl.c:35
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define PSN_RESET
Definition: prsht.h:118
#define E_NOTIMPL
Definition: ddrawi.h:99
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define LB_GETCURSEL
Definition: winuser.h:2021
unsigned int UINT
Definition: ndis.h:50
#define CBN_SELCHANGE
Definition: winuser.h:1961
#define IDD_MONITOR
Definition: resource.h:3
#define BST_CHECKED
Definition: winuser.h:197
#define DPRINT1
Definition: precomp.h:8
DWORD dmPelsHeight
Definition: wingdi.h:1644
HRESULT IDeskMonitor_AddPages(PDESKMONITOR This, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
Definition: deskmon.c:677
static __inline LPTSTR QueryDeskCplString(IDataObject *pdo, UINT cfFormat)
Definition: deskcplx.h:84
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
#define DESK_EXT_DISPLAYDEVICE
Definition: deskcplx.h:8
struct _DESKMONINFO * PDESKMONINFO
#define IDC_MONITORNAME
Definition: resource.h:5
#define IDC_MONITORLIST
Definition: resource.h:6
#define GetProcAddress(x, y)
Definition: compat.h:410
#define IDS_FREQFMT
Definition: resource.h:15
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
#define GetWindowLongPtr
Definition: treelist.c:73
INT_PTR(WINAPI * PDEVICEPROPERTIES)(HWND, LPCSTR, LPCSTR, BOOL)
Definition: deskmon.c:16
const GUID IID_IClassFactory
#define DESK_EXT_MONITORNAME
Definition: deskcplx.h:13
signed int * PLONG
Definition: retypes.h:5
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:394
#define LoadString
Definition: winuser.h:5720
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define PROPSHEETPAGE
Definition: prsht.h:371
#define WM_NOTIFY
Definition: richedit.h:61
#define SUCCEEDED(hr)
Definition: intsafe.h:57