ReactOS  0.4.14-dev-52-g6116262
deskadp.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 
13 
14 static VOID
17  DWORD dwBufferLen)
18 {
19  UINT uid = 0;
20 
21  switch (lpDevMode->dmBitsPerPel)
22  {
23  case 4:
24  uid = IDS_4BPP;
25  break;
26  case 8:
27  uid = IDS_8BPP;
28  break;
29  case 15:
30  uid = IDS_15BPP;
31  break;
32  case 16:
33  uid = IDS_16BPP;
34  break;
35  case 24:
36  uid = IDS_24BPP;
37  break;
38  case 32:
39  uid = IDS_32BPP;
40  break;
41  }
42 
43  if (uid == 0 ||
45  uid,
46  lpBuffer,
47  dwBufferLen))
48  {
49  lpBuffer[0] = TEXT('\0');
50  }
51 }
52 
53 static VOID
56  DWORD dwBufferLen)
57 {
58  TCHAR szFormat[64];
59 
60  if (lpDevMode->dmDisplayFrequency <= 1)
61  {
62  if (!LoadString(hInstance,
64  lpBuffer,
65  dwBufferLen))
66  {
67  lpBuffer[0] = TEXT('\0');
68  }
69  }
70  else
71  {
72  if (!LoadString(hInstance,
74  szFormat,
75  sizeof(szFormat) / sizeof(szFormat[0])))
76  {
77  szFormat[0] = TEXT('\0');
78  }
79 
81  dwBufferLen,
82  szFormat,
84  }
85 }
86 
87 static VOID
89  HWND hwndListAllModesDlg)
90 {
91  TCHAR szFormat[64], szBuffer[64], szColors[64], szRefreshRate[64];
92  PDEVMODEW lpDevMode, lpCurrentDevMode;
93  DWORD dwIndex = 0;
94  INT i;
95 
96  if (This->DeskExtInterface != NULL)
97  {
98  if (!LoadString(hInstance,
100  szFormat,
101  sizeof(szFormat) / sizeof(szFormat[0])))
102  {
103  szFormat[0] = TEXT('\0');
104  }
105 
106  lpCurrentDevMode = This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context);
107 
108  do
109  {
110  lpDevMode = This->DeskExtInterface->EnumAllModes(This->DeskExtInterface->Context,
111  dwIndex++);
112  if (lpDevMode != NULL)
113  {
115  szColors,
116  sizeof(szColors) / sizeof(szColors[0]));
117 
119  szRefreshRate,
120  sizeof(szRefreshRate) / sizeof(szRefreshRate[0]));
121 
122  _sntprintf(szBuffer,
123  sizeof(szBuffer) / sizeof(szBuffer[0]),
124  szFormat,
127  szColors,
128  szRefreshRate);
129 
130  i = (INT)SendDlgItemMessage(hwndListAllModesDlg,
132  LB_ADDSTRING,
133  0,
134  (LPARAM)szBuffer);
135  if (i >= 0)
136  {
137  SendDlgItemMessage(hwndListAllModesDlg,
140  (WPARAM)i,
141  (LPARAM)lpDevMode);
142 
143  if (lpDevMode == lpCurrentDevMode)
144  {
145  SendDlgItemMessage(hwndListAllModesDlg,
147  LB_SETCURSEL,
148  (WPARAM)i,
149  0);
150  }
151  }
152  }
153 
154  } while (lpDevMode != NULL);
155  }
156 }
157 
158 static BOOL
160  HWND hwndListAllModesDlg)
161 {
162  INT i;
163  PDEVMODEW lpSelDevMode = NULL;
164  BOOL bRet = FALSE;
165 
166  i = (INT)SendDlgItemMessage(hwndListAllModesDlg,
168  LB_GETCURSEL,
169  0,
170  0);
171 
172  if (i >= 0)
173  {
174  lpSelDevMode = (PDEVMODEW)SendDlgItemMessage(hwndListAllModesDlg,
177  (WPARAM)i,
178  0);
179  }
180 
181  if (lpSelDevMode != NULL)
182  {
183  This->lpSelDevMode = lpSelDevMode;
184  bRet = TRUE;
185  }
186 
187  return bRet;
188 }
189 
190 static INT_PTR CALLBACK
192  UINT uMsg,
193  WPARAM wParam,
194  LPARAM lParam)
195 {
197  INT_PTR Ret = 0;
198 
199  if (uMsg != WM_INITDIALOG)
200  {
202  }
203 
204  switch (uMsg)
205  {
206  case WM_INITDIALOG:
209 
211  hwndDlg);
212  Ret = TRUE;
213  break;
214 
215  case WM_COMMAND:
216  switch (LOWORD(wParam))
217  {
218  case IDOK:
220  hwndDlg))
221  {
222  EndDialog(hwndDlg,
223  IDOK);
224  }
225  break;
226 
227  case IDCANCEL:
228  EndDialog(hwndDlg,
229  IDCANCEL);
230  break;
231  }
232  break;
233 
234  case WM_CLOSE:
235  EndDialog(hwndDlg,
236  IDCANCEL);
237  break;
238  }
239 
240  return Ret;
241 }
242 
243 static VOID
245 {
246  PDEVMODEW lpPrevSel;
247 
248  lpPrevSel = This->lpSelDevMode;
249 
250  if (This->DeskExtInterface != NULL &&
253  This->hwndDlg,
255  (LPARAM)This) == IDOK)
256  {
257  if (lpPrevSel != This->lpSelDevMode)
258  {
260  This->hwndDlg);
261  This->DeskExtInterface->SetCurrentMode(This->DeskExtInterface->Context,
262  This->lpSelDevMode);
263  }
264  }
265 }
266 
267 static VOID
269 {
270  HMODULE hDevMgr;
271  PDEVICEPROPERTIESW pDevicePropertiesW;
272 
273  hDevMgr = LoadLibrary(TEXT("devmgr.dll"));
274  if (hDevMgr != NULL)
275  {
276  pDevicePropertiesW = (PDEVICEPROPERTIESW)GetProcAddress(hDevMgr,
277  "DevicePropertiesW");
278  if (pDevicePropertiesW != NULL)
279  {
280  pDevicePropertiesW(This->hwndDlg,
281  NULL,
282  This->lpDeviceId,
283  FALSE);
284  }
285 
286  FreeLibrary(hDevMgr);
287  }
288 }
289 
290 static VOID
292 {
293  LPTSTR lpAdapterName;
294 
295  This->lpDeviceId = QueryDeskCplString(This->pdtobj,
297  EnableWindow(GetDlgItem(This->hwndDlg,
299  This->lpDeviceId != NULL && This->lpDeviceId[0] != TEXT('\0'));
300  lpAdapterName = QueryDeskCplString(This->pdtobj,
302  if (lpAdapterName != NULL)
303  {
304  SetDlgItemText(This->hwndDlg,
306  lpAdapterName);
307 
308  LocalFree((HLOCAL)lpAdapterName);
309  }
310 
311  if (This->DeskExtInterface != NULL)
312  {
313  SetDlgItemTextW(This->hwndDlg,
314  IDC_CHIPTYPE,
315  This->DeskExtInterface->ChipType);
316  SetDlgItemTextW(This->hwndDlg,
317  IDC_DACTYPE,
318  This->DeskExtInterface->DacType);
319  SetDlgItemTextW(This->hwndDlg,
321  This->DeskExtInterface->MemorySize);
322  SetDlgItemTextW(This->hwndDlg,
324  This->DeskExtInterface->AdapterString);
325  SetDlgItemTextW(This->hwndDlg,
327  This->DeskExtInterface->BiosString);
328 
329  This->lpDevModeOnInit = This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context);
330  }
331  else
332  This->lpDevModeOnInit = NULL;
333 
334  This->lpSelDevMode = This->lpDevModeOnInit;
335 }
336 
337 static LONG
339 {
340  LONG lChangeRet;
341 
342  if (This->DeskExtInterface != NULL)
343  {
344  /* Change the display settings through desk.cpl */
345  lChangeRet = DeskCplExtDisplaySaveSettings(This->DeskExtInterface,
346  This->hwndDlg);
347  if (lChangeRet == DISP_CHANGE_SUCCESSFUL)
348  {
349  /* Save the new mode */
350  This->lpDevModeOnInit = This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context);
351  This->lpSelDevMode = This->lpDevModeOnInit;
352  return PSNRET_NOERROR;
353  }
354  else if (lChangeRet == DISP_CHANGE_RESTART)
355  {
356  /* Notify desk.cpl that the user needs to reboot */
358  return PSNRET_NOERROR;
359  }
360  }
361 
363 }
364 
365 static VOID
367 {
368  if (This->DeskExtInterface != NULL && This->lpDevModeOnInit != NULL)
369  {
370  This->DeskExtInterface->SetCurrentMode(This->DeskExtInterface->Context,
371  This->lpDevModeOnInit);
372  }
373 }
374 
375 static INT_PTR CALLBACK
377  UINT uMsg,
378  WPARAM wParam,
379  LPARAM lParam)
380 {
382  INT_PTR Ret = 0;
383 
384  if (uMsg != WM_INITDIALOG)
385  {
387  }
388 
389  switch (uMsg)
390  {
391  case WM_INITDIALOG:
393  This->hwndDlg = hwndDlg;
395 
397  Ret = TRUE;
398  break;
399 
400  case WM_COMMAND:
401  switch (LOWORD(wParam))
402  {
405  break;
406 
407  case IDC_LISTALLMODES:
409  break;
410  }
411 
412  break;
413 
414  case WM_NOTIFY:
415  {
416  NMHDR *nmh = (NMHDR *)lParam;
417 
418  switch (nmh->code)
419  {
420  case PSN_APPLY:
421  {
422  SetWindowLongPtr(hwndDlg,
425  break;
426  }
427 
428  case PSN_RESET:
430  break;
431  }
432  break;
433  }
434  }
435 
436  return Ret;
437 }
438 
439 static VOID
441 {
442  if (This->pdtobj != NULL)
443  {
444  IDataObject_Release(This->pdtobj);
445  This->pdtobj = NULL;
446  }
447 
448  if (This->DeskExtInterface != NULL)
449  {
450  LocalFree((HLOCAL)This->DeskExtInterface);
451  This->DeskExtInterface = NULL;
452  }
453 
454  if (This->lpDeviceId != NULL)
455  {
456  LocalFree((HLOCAL)This->lpDeviceId);
457  This->lpDeviceId = NULL;
458  }
459 }
460 
461 ULONG
463 {
464  ULONG ret;
465 
467  if (ret == 1)
469 
470  return ret;
471 }
472 
473 ULONG
475 {
476  ULONG ret;
477 
479  if (ret == 0)
480  {
483 
485  0,
486  This);
487  }
488 
489  return ret;
490 }
491 
494  REFIID iid,
495  PVOID *pvObject)
496 {
497  *pvObject = NULL;
498 
499  if (IsEqualIID(iid,
500  &IID_IShellPropSheetExt) ||
501  IsEqualIID(iid,
502  &IID_IUnknown))
503  {
505  }
506  else if (IsEqualIID(iid,
507  &IID_IShellExtInit))
508  {
509  *pvObject = impl_to_interface(This, IShellExtInit);
510  }
511  else if (IsEqualIID(iid,
513  {
514  *pvObject = impl_to_interface(This, IClassFactory);
515  }
516  else
517  {
518  DPRINT1("IDeskDisplayAdapter::QueryInterface(%p,%p): E_NOINTERFACE\n", iid, pvObject);
519  return E_NOINTERFACE;
520  }
521 
523  return S_OK;
524 }
525 
526 HRESULT
528  LPCITEMIDLIST pidlFolder,
529  IDataObject *pdtobj,
530  HKEY hkeyProgID)
531 {
532  DPRINT1("IDeskDisplayAdapter::Initialize(%p,%p,%p)\n", pidlFolder, pdtobj, hkeyProgID);
533 
534  if (pdtobj != NULL)
535  {
536  IDataObject_AddRef(pdtobj);
537  This->pdtobj = pdtobj;
538 
539  /* Get a copy of the desk.cpl extension interface */
540  This->DeskExtInterface = QueryDeskCplExtInterface(This->pdtobj);
541  if (This->DeskExtInterface != NULL)
542  return S_OK;
543  }
544 
545  return S_FALSE;
546 }
547 
548 HRESULT
550  LPFNADDPROPSHEETPAGE pfnAddPage,
551  LPARAM lParam)
552 {
553  HPROPSHEETPAGE hpsp;
554  PROPSHEETPAGE psp;
555 
556  DPRINT1("IDeskDisplayAdapter::AddPages(%p,%p)\n", pfnAddPage, lParam);
557 
558  psp.dwSize = sizeof(psp);
559  psp.dwFlags = PSP_DEFAULT;
560  psp.hInstance = hInstance;
561  psp.pszTemplate = MAKEINTRESOURCE(IDD_DISPLAYADAPTER);
562  psp.pfnDlgProc = DisplayAdapterDlgProc;
563  psp.lParam = (LPARAM)This;
564 
565  hpsp = CreatePropertySheetPage(&psp);
566  if (hpsp != NULL && pfnAddPage(hpsp, lParam))
567  return S_OK;
568 
569  return S_FALSE;
570 }
571 
572 HRESULT
574  EXPPS uPageID,
575  LPFNADDPROPSHEETPAGE pfnReplacePage,
576  LPARAM lParam)
577 {
578  DPRINT1("IDeskDisplayAdapter::ReplacePage(%u,%p,%p)\n", uPageID, pfnReplacePage, lParam);
579  return E_NOTIMPL;
580 }
581 
582 HRESULT
584  LPVOID *ppv)
585 {
587  HRESULT hRet = E_OUTOFMEMORY;
588 
589  DPRINT1("IDeskDisplayAdapter::Constructor(%p,%p)\n", riid, ppv);
590 
592  0,
593  sizeof(*This));
594  if (This != NULL)
595  {
597  sizeof(*This));
598 
600 
602  riid,
603  ppv);
604  if (!SUCCEEDED(hRet))
606  }
607 
608  return hRet;
609 }
610 
611 BOOL WINAPI
613  DWORD dwReason,
615 {
616  switch (dwReason)
617  {
618  case DLL_PROCESS_ATTACH:
619  hInstance = hinstDLL;
621  break;
622  }
623 
624  return TRUE;
625 }
#define IDC_LISTALLMODES
Definition: resource.h:13
#define LB_SETCURSEL
Definition: winuser.h:2045
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDC_MEMORYSIZE
Definition: resource.h:10
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: deskadp.c:612
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
static VOID InitListAllModesDialog(PDESKDISPLAYADAPTER This, HWND hwndListAllModesDlg)
Definition: deskadp.c:88
HRESULT IDeskDisplayAdapter_Constructor(REFIID riid, LPVOID *ppv)
Definition: deskadp.c:583
#define E_NOINTERFACE
Definition: winerror.h:2364
#define DESK_EXT_DISPLAYNAME
Definition: deskcplx.h:9
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
static VOID ResetDisplayAdapterChanges(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:366
#define LoadLibrary
Definition: winbase.h:3679
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define DISP_CHANGE_RESTART
Definition: winuser.h:191
static INT_PTR CALLBACK ListAllModesDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: deskadp.c:191
#define LB_ADDSTRING
Definition: winuser.h:2013
REFIID riid
Definition: precomp.h:44
#define LB_GETITEMDATA
Definition: winuser.h:2023
DWORD dmDisplayFrequency
Definition: wingdi.h:1597
static __inline PDESK_EXT_INTERFACE QueryDeskCplExtInterface(IDataObject *pdo)
Definition: deskcplx.h:48
#define PropSheet_RestartWindows(d)
Definition: prsht.h:334
#define IDD_DISPLAYADAPTER
Definition: resource.h:3
#define INT
Definition: polytest.cpp:20
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define IDC_ADAPTERSTRING
Definition: resource.h:11
#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
#define ZeroMemory
Definition: winbase.h:1635
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
Definition: prsht.h:309
HRESULT STDMETHODCALLTYPE IDeskDisplayAdapter_QueryInterface(PDESKDISPLAYADAPTER This, REFIID iid, PVOID *pvObject)
Definition: deskadp.c:493
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
static VOID IDeskDisplayAdapter_Destroy(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:440
static VOID ShowAdapterProperties(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:268
UINT_PTR WPARAM
Definition: windef.h:207
#define SendDlgItemMessage
Definition: winuser.h:5743
#define PSN_APPLY
Definition: prsht.h:117
int32_t INT_PTR
Definition: typedefs.h:62
#define DESK_EXT_DISPLAYID
Definition: deskcplx.h:10
static __inline LONG DeskCplExtDisplaySaveSettings(PDESK_EXT_INTERFACE DeskExtInterface, HWND hwndDlg)
Definition: deskcplx.h:122
#define BOOL
Definition: nt_native.h:43
HRESULT IDeskDisplayAdapter_AddPages(PDESKDISPLAYADAPTER This, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
Definition: deskadp.c:549
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
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
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
UINT code
Definition: winuser.h:3133
DWORD dwReason
Definition: misc.cpp:154
#define IDES_REFRESHRATEFMT
Definition: resource.h:20
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 E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
#define S_FALSE
Definition: winerror.h:2357
#define PSNRET_INVALID_NOCHANGEPAGE
Definition: prsht.h:131
smooth NULL
Definition: ftsmooth.c:416
#define IDS_4BPP
Definition: resource.h:21
LONG_PTR LPARAM
Definition: windef.h:208
static BOOL ChangeSelectedMode(PDESKDISPLAYADAPTER This, HWND hwndListAllModesDlg)
Definition: deskadp.c:159
ULONG IDeskDisplayAdapter_AddRef(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:462
#define IDS_15BPP
Definition: resource.h:23
static _In_ DWORD _Inout_ PDEVMODEA lpDevMode
Definition: dispmode.c:77
#define IDC_CHIPTYPE
Definition: resource.h:8
static VOID GetColorDescription(PDEVMODEW lpDevMode, LPTSTR lpBuffer, DWORD dwBufferLen)
Definition: deskadp.c:15
#define CreatePropertySheetPage
Definition: prsht.h:381
static INT_PTR CALLBACK DisplayAdapterDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: deskadp.c:376
char TCHAR
Definition: xmlstorage.h:189
#define PSP_DEFAULT
Definition: prsht.h:22
INT_PTR(WINAPI * PDEVICEPROPERTIESW)(HWND, LPCWSTR, LPCWSTR, BOOL)
Definition: deskadp.c:12
#define FreeLibrary(x)
Definition: compat.h:405
#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
ULONG IDeskDisplayAdapter_Release(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:474
const GUID IID_IUnknown
#define WM_CLOSE
Definition: winuser.h:1603
#define WINAPI
Definition: msvc.h:8
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
VOID IDeskDisplayAdapter_InitIface(PDESKDISPLAYADAPTER This)
Definition: shxiface.c:176
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LPCPROPSHEETPAGE
Definition: prsht.h:373
#define IDS_MODEFMT
Definition: resource.h:18
DWORD dmPelsHeight
Definition: wingdi.h:1592
#define LB_SETITEMDATA
Definition: winuser.h:2047
#define SetDlgItemText
Definition: winuser.h:5750
#define IDC_ADAPTERNAME
Definition: resource.h:6
#define PSNRET_NOERROR
Definition: prsht.h:129
#define DialogBoxParam
Definition: winuser.h:5665
int ret
struct _DESKDISPLAYADAPTER * PDESKDISPLAYADAPTER
#define InterlockedDecrement
Definition: armddk.h:52
#define DWLP_USER
Definition: winuser.h:866
HRESULT IDeskDisplayAdapter_ReplacePage(PDESKDISPLAYADAPTER This, EXPPS uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
Definition: deskadp.c:573
#define _sntprintf
Definition: xmlstorage.h:201
#define WM_COMMAND
Definition: winuser.h:1722
#define IDS_16BPP
Definition: resource.h:24
#define RegisterClipboardFormat
Definition: winuser.h:5739
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define IDS_24BPP
Definition: resource.h:25
DWORD dmBitsPerPel
Definition: wingdi.h:1590
HRESULT IDeskDisplayAdapter_Initialize(PDESKDISPLAYADAPTER This, LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
Definition: deskadp.c:527
HWND WINAPI GetParent(_In_ HWND)
#define S_OK
Definition: intsafe.h:59
#define TEXT(s)
Definition: k32.h:26
#define IDC_ALLVALIDMODES
Definition: resource.h:16
#define InterlockedIncrement
Definition: armddk.h:53
static LONG ApplyDisplayAdapterChanges(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:338
#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 IDC_ADAPTERPROPERTIES
Definition: resource.h:7
#define DPRINT1
Definition: precomp.h:8
static VOID ShowListAllModes(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:244
static __inline LPTSTR QueryDeskCplString(IDataObject *pdo, UINT cfFormat)
Definition: deskcplx.h:84
#define IDS_32BPP
Definition: resource.h:26
unsigned int ULONG
Definition: retypes.h:1
#define GetProcAddress(x, y)
Definition: compat.h:410
#define IDC_DACTYPE
Definition: resource.h:9
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDCANCEL
Definition: winuser.h:825
const GUID IID_IClassFactory
signed int * PLONG
Definition: retypes.h:5
#define IDD_LISTALLMODES
Definition: resource.h:4
static VOID InitDisplayAdapterDialog(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:291
#define IDC_BIOSINFORMATION
Definition: resource.h:12
#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 IDS_DEFREFRESHRATE
Definition: resource.h:19
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static VOID GetRefreshRateDescription(PDEVMODEW lpDevMode, LPTSTR lpBuffer, DWORD dwBufferLen)
Definition: deskadp.c:54
#define PROPSHEETPAGE
Definition: prsht.h:371
#define IDS_8BPP
Definition: resource.h:22
#define WM_NOTIFY
Definition: richedit.h:61
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static HINSTANCE hInstance
Definition: deskadp.c:10
DWORD dmPelsWidth
Definition: wingdi.h:1591