ReactOS 0.4.17-dev-806-gffa4164
compstui_main.c
Go to the documentation of this file.
1/*
2 * Implementation of the Common Property Sheets User Interface
3 *
4 * Copyright 2006 Detlef Riekenberg
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <assert.h>
22#include <stdarg.h>
23#include <stdlib.h>
24#include <string.h>
25
26#define COBJMACROS
27
28#include "windef.h"
29#include "winbase.h"
30#include "winuser.h"
31#include "commctrl.h"
32#include "ddk/compstui.h"
33
34#include "wine/debug.h"
35#include "wine/list.h"
36
38
40
41typedef struct
42{
45 union
46 {
48 char *titleA;
49 };
52 union
53 {
56 };
58
60{
63 struct list funcs;
64};
65
67{
70};
71
73{
74 struct list entry;
81};
82
83#define HANDLE_FIRST 0x43440001
84static struct cps_data
85{
86 enum
87 {
93 union
94 {
95 void *data;
97 struct propsheet *ps;
100 };
101} handles[0x1000];
103
106{
107 0, 0, &handles_cs,
109 0, 0, { (DWORD_PTR)(__FILE__ ": handles_cs") }
110};
111static CRITICAL_SECTION handles_cs = { &handles_cs_debug, -1, 0, 0, 0, 0 };
112
113static LONG_PTR WINAPI cps_callback(HANDLE hcps, UINT func, LPARAM lparam1, LPARAM lparam2);
114
116{
117 struct cps_data *ret;
118
120 return NULL;
121
123 return ret->type == HANDLE_FREE ? NULL : ret;
124}
125
127{
128 void *data = NULL;
129
130 switch(type)
131 {
132 case HANDLE_PROPSHEET:
133 data = calloc(1, sizeof(struct propsheet));
134 break;
136 data = calloc(1, sizeof(struct propsheetpage));
137 break;
139 data = calloc(1, sizeof(struct propsheetfunc));
140 break;
141 }
142
143 if (!data)
144 return NULL;
145
147
149 {
151 FIXME("out of handles\n");
152 free(data);
153 return NULL;
154 }
155
157 if ((*cps_data)->next_free)
158 first_free_handle = (*cps_data)->next_free;
159 else
160 first_free_handle = (*cps_data) + 1;
162
163 (*cps_data)->type = type;
164 (*cps_data)->data = data;
165 return (HANDLE)(HANDLE_FIRST + ((*cps_data) - handles));
166}
167
169{
171
172 if (!data)
173 return;
174
175 data->type = HANDLE_FREE;
176 free(data->data);
177
179 data->next_free = first_free_handle;
182}
183
185{
186 struct cps_data *cps_data = get_handle_data(hcps);
187 struct cps_data *cpsp_data;
188 HANDLE ret;
189
190 if (!cps_data || !hpsp)
191 return 0;
192
194 {
195 FIXME("unsupported handle type %d\n", cps_data->type);
196 return 0;
197 }
198
199 if (cps_data->ps->pages_cnt == ARRAY_SIZE(cps_data->ps->pages))
200 return 0;
201
203 if (!ret)
204 return 0;
205 cpsp_data->psp->hpsp = hpsp;
206
207 cps_data->ps->pages[cps_data->ps->pages_cnt++] = ret;
208 return ret;
209}
210
212{
213 struct cps_data *cps_data = get_handle_data(hcps);
214 struct cps_data *cpsf_data;
216 HANDLE ret;
217 LONG lret;
218
219 if (!cps_data || !func)
220 return 0;
221
223 {
224 FIXME("unsupported handle type %d\n", cps_data->type);
225 return 0;
226 }
227
229 if (!ret)
230 return 0;
231 cpsf_data->psf->handle = ret;
232 cpsf_data->psf->func = func;
233 cpsf_data->psf->unicode = unicode;
234 cpsf_data->psf->lparam = lparam;
235
236 memset(&info, 0, sizeof(info));
237 info.cbSize = sizeof(info);
239 info.Flags = unicode ? PSUIINFO_UNICODE : 0;
241 info.hComPropSheet = hcps;
242 info.pfnComPropSheet = cps_callback;
243 info.lParamInit = lparam;
244
246 lret = func(&callback_info, lparam);
247 cpsf_data->psf->user_data = callback_info.UserData;
248 cpsf_data->psf->result = callback_info.Result;
249 if (lret <= 0)
250 {
253 callback_info.UserData = cpsf_data->psf->user_data;
254 callback_info.Result = cpsf_data->psf->result;
256 func(&callback_info, 0);
257 return 0;
258 }
259
260 list_add_tail(&cps_data->ps->funcs, &cpsf_data->psf->entry);
261 return ret;
262}
263
265 DLGPROC dlg_proc, BOOL unicode)
266{
267 struct cps_data *cps_data = get_handle_data(hcps);
268 struct cps_data *cpsp_data;
269 HPROPSHEETPAGE hpsp;
270 HANDLE ret;
271
272 if (!cps_data)
273 return 0;
274
276 {
277 FIXME("unsupported handle type %d\n", cps_data->type);
278 return 0;
279 }
280
281 if (cps_data->ps->pages_cnt == ARRAY_SIZE(cps_data->ps->pages))
282 return 0;
283
285 if (!ret)
286 return 0;
287
288 info->cbSize = sizeof(*info);
289 info->wReserved = 0;
290 info->hComPropSheet = hcps;
291 info->hCPSUIPage = ret;
292 info->pfnComPropSheet = cps_callback;
293
294 if (unicode)
296 else
298 if (!hpsp)
299 {
301 return 0;
302 }
303
304 cpsp_data->psp->hpsp = hpsp;
305 cpsp_data->psp->dlg_proc = dlg_proc;
306 cps_data->ps->pages[cps_data->ps->pages_cnt++] = ret;
307 return ret;
308}
309
311{
312 if (msg == WM_INITDIALOG)
313 {
315 PSPINFO *info = (PSPINFO*)((BYTE*)lparam + psp->dwSize - sizeof(*info));
316 struct cps_data *cpsp_data = get_handle_data(info->hCPSUIPage);
317
318 psp->dwSize -= sizeof(*info);
319 psp->pfnDlgProc = cpsp_data->psp->dlg_proc;
321 return psp->pfnDlgProc(hwnd, msg, wparam, lparam);
322 }
323
324 return FALSE;
325}
326
328{
329 PROPSHEETPAGEW *psp_copy;
330 PSPINFO *info;
331 HANDLE ret;
332
333 if (!psp || psp->dwSize < PROPSHEETPAGEW_V1_SIZE)
334 return 0;
335
336 psp_copy = (PROPSHEETPAGEW*)malloc(psp->dwSize + sizeof(*info));
337 if (!psp_copy)
338 return 0;
339 memcpy(psp_copy, psp, psp->dwSize);
340 psp_copy->dwSize += sizeof(*info);
342
343 info = (PSPINFO*)((BYTE*)psp_copy + psp->dwSize);
344 ret = add_propsheetpage(hcps, psp_copy, info, psp->pfnDlgProc, TRUE);
345 free(psp_copy);
346 return ret;
347}
348
350{
351 if (msg == WM_INITDIALOG)
352 {
354 PSPINFO *info = (PSPINFO*)((BYTE*)lparam + psp->dwSize - sizeof(*info));
355 struct cps_data *cpsp_data = get_handle_data(info->hCPSUIPage);
356
357 psp->dwSize -= sizeof(*info);
358 psp->pfnDlgProc = cpsp_data->psp->dlg_proc;
360 return psp->pfnDlgProc(hwnd, msg, wparam, lparam);
361 }
362
363 return FALSE;
364}
365
367{
368 PROPSHEETPAGEA *psp_copy;
369 PSPINFO *info;
370 HANDLE ret;
371
372 if (!psp || psp->dwSize < PROPSHEETPAGEW_V1_SIZE)
373 return 0;
374
375 psp_copy = (PROPSHEETPAGEA*)malloc(psp->dwSize + sizeof(*info));
376 if (!psp_copy)
377 return 0;
378 memcpy(psp_copy, psp, psp->dwSize);
379 psp_copy->dwSize += sizeof(*info);
381
382 info = (PSPINFO*)((BYTE*)psp_copy + psp->dwSize);
383 ret = add_propsheetpage(hcps, psp_copy, info, psp->pfnDlgProc, FALSE);
384 free(psp_copy);
385 return ret;
386}
387
388static LONG_PTR WINAPI cps_callback(HANDLE hcps, UINT func, LPARAM lparam1, LPARAM lparam2)
389{
390 TRACE("(%p, %u, %Ix, %Ix\n", hcps, func, lparam1, lparam2);
391
392 switch(func)
393 {
395 return (LONG_PTR)add_hpropsheetpage(hcps, (HPROPSHEETPAGE)lparam1);
398 return (LONG_PTR)add_propsheetfunc(hcps, (PFNPROPSHEETUI)lparam1,
401 return (LONG_PTR)add_propsheetpageA(hcps, (PROPSHEETPAGEA*)lparam1);
403 return (LONG_PTR)add_propsheetpageW(hcps, (PROPSHEETPAGEW*)lparam1);
426 FIXME("func not supported %d\n", func);
427 return 0;
428 default:
429 ERR("unknown func: %d\n", func);
430 return 0;
431 }
432}
433
435{
436 HPROPSHEETPAGE hpsp[100];
438 WCHAR title[256];
440 int i, len;
441
442 if (!ps->pages_cnt)
444
445 memset(&psh, 0, sizeof(psh));
446 psh.dwSize = sizeof(psh);
447 if (header->flags & PSUIHDRF_NOAPPLYNOW)
448 psh.dwFlags |= PSH_NOAPPLYNOW;
449 psh.hwndParent = header->parent;
450 psh.hInstance = header->hinst;
451 psh.pszCaption = title;
452
453 if (!(header->flags & PSUIHDRF_USEHICON) && !header->icon_id)
454 header->icon_id = IDI_CPSUI_OPTION;
455
456 if (header->flags & PSUIHDRF_USEHICON)
457 {
458 psh.dwFlags |= PSH_USEHICON;
459 psh.hIcon = header->hicon;
460 }
461 else if (header->icon_id >= IDI_CPSUI_ICONID_FIRST &&
462 header->icon_id <= IDI_CPSUI_ICONID_LAST)
463 {
464 FIXME("icon not implemented: %Id\n", header->icon_id);
465 }
466 else
467 {
468 psh.dwFlags |= PSH_USEICONID;
469 psh.pszIcon = (WCHAR*)header->icon_id;
470 }
471
472 if (header->titleW)
474 else
476
477 if ((header->flags & PSUIHDRF_DEFTITLE) &&
478 (!header->titleW || !(header->flags & PSUIHDRF_EXACT_PTITLE)))
479 {
480 len = wcslen(title);
481 if (len < ARRAY_SIZE(title) - 1)
482 {
483 title[len++] = ' ';
485 }
486 }
487
488 if ((header->flags & PSUIHDRF_PROPTITLE) &&
489 (!header->titleW || !(header->flags & PSUIHDRF_EXACT_PTITLE)))
490 {
491 len = wcslen(title);
492 if (len < ARRAY_SIZE(title) - 1)
493 {
494 title[len++] = ' ';
496 }
497 }
498
499 psh.nPages = ps->pages_cnt;
500 psh.phpage = hpsp;
501 for (i = 0; i < ps->pages_cnt; i++)
502 hpsp[i] = get_handle_data(ps->pages[i])->psp->hpsp;
503
504 ret = PropertySheetW(&psh);
505
506 switch(ret)
507 {
508 case -1:
511 return CPSUI_REBOOTSYSTEM;
514 default:
515 return CPSUI_OK;
516 }
517}
518
520{
523 struct cps_data *cps_data;
524 HANDLE cps_handle;
525 LONG ret;
526 int i;
527
528 if (!callback || !(cps_handle = alloc_handle(&cps_data, HANDLE_PROPSHEET)))
529 {
530 SetLastError(0);
532 }
533 list_init(&cps_data->ps->funcs);
534
535 memset(&info, 0, sizeof(info));
536 info.cbSize = sizeof(info);
537 info.lParamInit = lparam;
541
543 info.Flags = unicode ? PSUIINFO_UNICODE : 0;
544 info.hComPropSheet = cps_handle;
545 info.pfnComPropSheet = cps_callback;
549 info.UserData = callback_info.UserData;
550 info.Result = callback_info.Result;
551 if (ret <= 0)
552 {
554 goto destroy;
555 }
556
557 memset(&header, 0, sizeof(header));
558 header.size = sizeof(header);
559 header.parent = hwnd;
563 info.UserData = callback_info.UserData;
564 info.Result = callback_info.Result;
565 if (ret <= 0)
566 {
568 goto destroy;
569 }
570
572
573destroy:
575 while (!list_empty(&cps_data->ps->funcs))
576 {
577 struct propsheetfunc *func = LIST_ENTRY(list_head(&cps_data->ps->funcs),
578 struct propsheetfunc, entry);
579
580 list_remove(&func->entry);
581
583 callback_info.Flags = func->unicode ? PSUIINFO_UNICODE : 0;
584 callback_info.lParamInit = func->lparam;
585 callback_info.UserData = func->user_data;
586 callback_info.Result = func->result;
587 func->func(&callback_info, ret <= 0 ? 0 : 0x100);
588 free_handle(func->handle);
589 }
590
592 callback(&callback_info, ret <= 0 ? 0 : 0x100);
593
594 for (i = 0; i < cps_data->ps->pages_cnt; i++)
595 free_handle(cps_data->ps->pages[i]);
596 free_handle(cps_handle);
597
598 if (res) *res = callback_info.Result;
599 return ret;
600}
601
602/******************************************************************
603 * CommonPropertySheetUIA (COMPSTUI.@)
604 *
605 */
607{
608 FIXME("(%p, %p, 0x%Ix, %p)\n", hWnd, pfnPropSheetUI, lparam, pResult);
609 return CPSUI_CANCEL;
610}
611
612/******************************************************************
613 * CommonPropertySheetUIW (COMPSTUI.@)
614 *
615 */
617{
618 TRACE("(%p, %p, 0x%Ix, %p)\n", hwnd, callback, lparam, res);
620}
621
622/******************************************************************
623 * GetCPSUIUserData (COMPSTUI.@)
624 *
625 */
627{
628 FIXME("(%p): stub\n", hDlg);
629 return 0;
630}
631
632/******************************************************************
633 * SetCPSUIUserData (COMPSTUI.@)
634 *
635 */
637{
638 FIXME("(%p, %08Ix): stub\n", hDlg, UserData);
639 return TRUE;
640}
641
643{
646 return TRUE;
647}
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
void destroy(_Tp *__pointer)
Definition: _construct.h:278
#define msg(x)
Definition: auth_time.c:54
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
Definition: list.h:37
static struct cps_data * first_free_handle
static HANDLE add_propsheetpage(HANDLE hcps, void *psp, PSPINFO *info, DLGPROC dlg_proc, BOOL unicode)
static INT_PTR CALLBACK propsheetpage_dlg_procW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static HANDLE add_hpropsheetpage(HANDLE hcps, HPROPSHEETPAGE hpsp)
static void free_handle(HANDLE handle)
static struct cps_data * get_handle_data(HANDLE handle)
static HMODULE compstui_hmod
Definition: compstui_main.c:39
LONG WINAPI CommonPropertySheetUIA(HWND hWnd, PFNPROPSHEETUI pfnPropSheetUI, LPARAM lparam, LPDWORD pResult)
#define HANDLE_FIRST
Definition: compstui_main.c:83
static CRITICAL_SECTION handles_cs
static LONG_PTR WINAPI cps_callback(HANDLE hcps, UINT func, LPARAM lparam1, LPARAM lparam2)
static HANDLE alloc_handle(struct cps_data **cps_data, int type)
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved)
static CRITICAL_SECTION_DEBUG handles_cs_debug
static HANDLE add_propsheetpageW(HANDLE hcps, PROPSHEETPAGEW *psp)
ULONG_PTR WINAPI GetCPSUIUserData(HWND hDlg)
static LONG create_prop_dlg(HWND hwnd, PFNPROPSHEETUI callback, LPARAM lparam, DWORD *res, BOOL unicode)
BOOL WINAPI SetCPSUIUserData(HWND hDlg, ULONG_PTR UserData)
static LONG create_property_sheetW(struct propsheet *ps, PROPSHEETUI_INFO_HEADERAW *header)
static INT_PTR CALLBACK propsheetpage_dlg_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
LONG WINAPI CommonPropertySheetUIW(HWND hwnd, PFNPROPSHEETUI callback, LPARAM lparam, LPDWORD res)
static struct cps_data handles[0x1000]
static HANDLE add_propsheetfunc(HANDLE hcps, PFNPROPSHEETUI func, LPARAM lparam, BOOL unicode)
static HANDLE add_propsheetpageA(HANDLE hcps, PROPSHEETPAGEA *psp)
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define DLGPROC
Definition: maze.c:62
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
Definition: propsheet.c:3120
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2950
HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA lpPropSheetPage)
Definition: propsheet.c:3036
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1971
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define SetLastError(x)
Definition: compat.h:752
#define CALLBACK
Definition: compat.h:35
_ACRTIMP errno_t __cdecl wcscpy_s(wchar_t *, size_t, const wchar_t *)
Definition: wcs.c:2444
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
return ret
Definition: mutex.c:147
r reserved
Definition: btrfs.c:3006
#define ULONG_PTR
Definition: config.h:101
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum func
Definition: glext.h:6028
GLuint res
Definition: glext.h:9613
GLenum GLsizei len
Definition: glext.h:6722
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
unsigned int UINT
Definition: sysinfo.c:13
uint32_t entry
Definition: isohybrid.c:63
if(dx< 0)
Definition: linetemp.h:194
LONG_PTR LPARAM
Definition: minwindef.h:175
UINT_PTR WPARAM
Definition: minwindef.h:174
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static HINSTANCE hinst
Definition: edit.c:551
static HICON
Definition: imagelist.c:80
static IPrintDialogCallback callback
Definition: printdlg.c:326
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
#define ID_PSRESTARTWINDOWS
Definition: prsht.h:132
#define PSH_USEHICON
Definition: prsht.h:41
#define ID_PSREBOOTSYSTEM
Definition: prsht.h:133
#define PSH_USEICONID
Definition: prsht.h:42
#define PROPSHEETPAGEW_V1_SIZE
Definition: prsht.h:246
#define PSH_NOAPPLYNOW
Definition: prsht.h:47
static char title[]
Definition: ps.c:92
#define CPSFUNC_GET_PAGECOUNT
Definition: compstui.h:555
#define CPSFUNC_GET_PFNPROPSHEETUI_ICON
Definition: compstui.h:561
#define CPSFUNC_GET_HPSUIPAGES
Definition: compstui.h:557
#define CPSFUNC_INSERT_PSUIPAGEA
Definition: compstui.h:563
#define CPSFUNC_ADD_PFNPROPSHEETUIA
Definition: compstui.h:551
#define PROPSHEETUI_INFO_VERSION
Definition: compstui.h:635
#define CPSFUNC_DO_APPLY_CPSUI
Definition: compstui.h:572
#define CPSFUNC_INSERT_PSUIPAGEW
Definition: compstui.h:564
#define IDS_CPSUI_DEFAULT
Definition: compstui.h:179
#define PROPSHEETUI_REASON_BEFORE_INIT
Definition: compstui.h:632
#define CPSFUNC_ADD_PCOMPROPSHEETUIW
Definition: compstui.h:550
#define CPSFUNC_ADD_PCOMPROPSHEETUIA
Definition: compstui.h:549
#define PROPSHEETUI_REASON_INIT
Definition: compstui.h:627
#define IDS_CPSUI_OPTIONS
Definition: compstui.h:168
#define CPSFUNC_SET_PSUIPAGE_ICON
Definition: compstui.h:567
#define PSUIHDRF_PROPTITLE
Definition: compstui.h:694
#define CPSFUNC_SET_DMPUB_HIDEBITS
Definition: compstui.h:570
#define IDI_CPSUI_ICONID_LAST
Definition: compstui.h:140
#define CPSFUNC_LOAD_CPSUI_ICON
Definition: compstui.h:560
#define CPSFUNC_SET_FUSION_CONTEXT
Definition: compstui.h:575
#define CPSFUNC_SET_DATABLOCK
Definition: compstui.h:568
#define CPSFUNC_ADD_HPROPSHEETPAGE
Definition: compstui.h:547
#define PROPSHEETUI_REASON_DESTROY
Definition: compstui.h:629
#define CPSFUNC_SET_PSUIPAGE_TITLEW
Definition: compstui.h:566
#define CPSFUNC_ADD_PFNPROPSHEETUIW
Definition: compstui.h:552
#define CPSFUNC_SET_PSUIPAGE_TITLEA
Definition: compstui.h:565
#define CPSFUNC_LOAD_CPSUI_STRINGW
Definition: compstui.h:559
#define CPSFUNC_IGNORE_CPSUI_PSN_APPLY
Definition: compstui.h:571
#define CPSFUNC_DELETE_HCOMPROPSHEET
Definition: compstui.h:553
#define PSUIHDRF_NOAPPLYNOW
Definition: compstui.h:693
#define CPSUI_OK
Definition: compstui.h:641
#define CPSFUNC_LOAD_CPSUI_STRINGA
Definition: compstui.h:558
#define PSUIHDRF_USEHICON
Definition: compstui.h:695
#define CPSUI_CANCEL
Definition: compstui.h:640
#define ERR_CPSUI_GETLASTERROR
Definition: compstui.h:645
#define CPSFUNC_ADD_PROPSHEETPAGEW
Definition: compstui.h:548
#define IDI_CPSUI_ICONID_FIRST
Definition: compstui.h:27
#define CPSFUNC_ADD_PROPSHEETPAGEA
Definition: compstui.h:562
#define CPSUI_REBOOTSYSTEM
Definition: compstui.h:643
#define CPSUI_RESTARTWINDOWS
Definition: compstui.h:642
#define PSUIHDRF_EXACT_PTITLE
Definition: compstui.h:697
#define PSUIHDRF_DEFTITLE
Definition: compstui.h:696
#define CPSFUNC_SET_RESULT
Definition: compstui.h:556
#define IDI_CPSUI_OPTION
Definition: compstui.h:95
LONG(FAR * PFNPROPSHEETUI)(PPROPSHEETUI_INFO pPSUIInfo, LPARAM lParam)
Definition: compstui.h:906
#define IDS_CPSUI_PROPERTIES
Definition: compstui.h:160
#define ERR_CPSUI_NO_PROPSHEETPAGE
Definition: compstui.h:652
#define PROPSHEETUI_REASON_GET_INFO_HEADER
Definition: compstui.h:628
#define CPSFUNC_SET_HSTARTPAGE
Definition: compstui.h:554
#define PSUIINFO_UNICODE
Definition: compstui.h:637
#define CPSFUNC_QUERY_DATABLOCK
Definition: compstui.h:569
#define calloc
Definition: rosglue.h:14
#define LoadStringW
Definition: utils.h:64
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
HINSTANCE hInstance
Definition: prsht.h:296
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
LPCWSTR pszIcon
Definition: prsht.h:299
HWND hwndParent
Definition: prsht.h:295
HPROPSHEETPAGE * phpage
Definition: prsht.h:309
LPCWSTR pszCaption
Definition: prsht.h:301
DLGPROC pfnDlgProc
Definition: prsht.h:189
DWORD dwSize
Definition: prsht.h:177
DLGPROC pfnDlgProc
Definition: prsht.h:226
DWORD dwSize
Definition: prsht.h:214
Definition: mmc.idl:376
struct propsheet * ps
Definition: compstui_main.c:97
enum cps_data::@354 type
struct propsheetfunc * psf
Definition: compstui_main.c:99
void * data
Definition: compstui_main.c:95
@ HANDLE_PROPSHEET
Definition: compstui_main.c:89
@ HANDLE_PROPSHEETPAGE
Definition: compstui_main.c:90
@ HANDLE_PROPSHEETFUNC
Definition: compstui_main.c:91
struct propsheetpage * psp
Definition: compstui_main.c:98
struct cps_data * next_free
Definition: compstui_main.c:96
Definition: list.h:15
struct list funcs
Definition: compstui_main.c:63
HANDLE pages[100]
Definition: compstui_main.c:62
ULONG_PTR user_data
Definition: compstui_main.c:79
PFNPROPSHEETUI func
Definition: compstui_main.c:76
struct list entry
Definition: compstui_main.c:74
ULONG_PTR result
Definition: compstui_main.c:80
DLGPROC dlg_proc
Definition: compstui_main.c:69
HPROPSHEETPAGE hpsp
Definition: compstui_main.c:68
#define LIST_ENTRY(type)
Definition: queue.h:175
#define DWORD_PTR
Definition: treelist.c:76
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t * LPDWORD
Definition: typedefs.h:59
uint32_t ULONG_PTR
Definition: typedefs.h:65
static INT_PTR __stdcall dlg_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WINAPI
Definition: msvc.h:6
#define SetWindowLongPtrA
Definition: winuser.h:5511
#define DWLP_DLGPROC
Definition: winuser.h:882
#define WM_INITDIALOG
Definition: winuser.h:1767
#define SetWindowLongPtrW
Definition: winuser.h:5512
unsigned char BYTE
Definition: xxhash.c:193