Optimized include/*.h: (recursively) include all headers needed by
[wine] / dlls / comctl32 / propsheet.c
1 /*
2  * Property Sheets
3  *
4  * Copyright 1998 Francis Beaudet
5  *
6  * TODO:
7  *   - All the functions are simply stubs
8  *
9  */
10
11 #include "commctrl.h"
12 #include "prsht.h"
13 #include "propsheet.h"
14 #include "win.h"
15 #include "debug.h"
16
17
18 LRESULT WINAPI
19 PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam);
20
21
22
23
24
25
26
27 /*****************************************************************
28  *            PropertySheet32A   (COMCTL32.84)(COMCTL32.83)
29  */
30 INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A lppsh)
31 {
32         HWND32 hwnd;
33
34     FIXME(propsheet, "(%p): stub\n", lppsh);
35
36         if (lppsh->dwFlags & PSH_MODELESS) {
37         hwnd = CreateDialogParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
38                     lppsh->hwndParent, (DLGPROC32)PROPSHEET_WindowProc,
39                     (LPARAM) lppsh );
40                 ShowWindow32 (hwnd, TRUE);
41         } else {
42                 hwnd =  DialogBoxParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
43                     lppsh->hwndParent, (DLGPROC32)PROPSHEET_WindowProc,
44                     (LPARAM) lppsh );
45         }
46     return hwnd;
47 }
48
49 /*****************************************************************
50  *            PropertySheet32W   (COMCTL32.85)
51  */
52 INT32 WINAPI PropertySheet32W(LPCPROPSHEETHEADER32W propertySheetHeader)
53 {
54     FIXME(propsheet, "(%p): stub\n", propertySheetHeader);
55
56     return -1;
57 }
58
59
60
61
62
63 /*****************************************************************
64  *            CreatePropertySheetPage32A   (COMCTL32.19)(COMCTL32.18)
65  */
66 HPROPSHEETPAGE WINAPI CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A lpPropSheetPage)
67 {
68     FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
69
70     return 0;
71 }
72
73 /*****************************************************************
74  *            CreatePropertySheetPage32W   (COMCTL32.20)
75  */
76 HPROPSHEETPAGE WINAPI CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W lpPropSheetPage)
77 {
78     FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
79
80     return 0;
81 }
82
83 /*****************************************************************
84  *            DestroyPropertySheetPage32   (COMCTL32.24)
85  */
86 BOOL32 WINAPI DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage)
87 {
88     FIXME(propsheet, "(0x%08lx): stub\n", (DWORD)hPropPage);
89     return FALSE;
90 }
91
92
93
94 LRESULT WINAPI
95 PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
96 {
97     /* WND *wndPtr = WIN_FindWndPtr(hwnd); */
98
99     switch (uMsg) {
100        case PSM_SETCURSEL:
101            FIXME (propsheet, "Unimplemented msg PSM_SETCURSEL\n");
102            return 0;
103        case PSM_REMOVEPAGE:
104            FIXME (propsheet, "Unimplemented msg PSM_REMOVEPAGE\n");
105            return 0;
106        case PSM_ADDPAGE:
107            FIXME (propsheet, "Unimplemented msg PSM_ADDPAGE\n");
108            return 0;
109        case PSM_CHANGED:
110            FIXME (propsheet, "Unimplemented msg PSM_CHANGED\n");
111            return 0;
112        case PSM_RESTARTWINDOWS:
113            FIXME (propsheet, "Unimplemented msg PSM_RESTARTWINDOWS\n");
114            return 0;
115        case PSM_REBOOTSYSTEM:
116            FIXME (propsheet, "Unimplemented msg PSM_REBOOTSYSTEM\n");
117            return 0;
118        case PSM_CANCELTOCLOSE:
119            FIXME (propsheet, "Unimplemented msg PSM_CANCELTOCLOSE\n");
120            return 0;
121        case PSM_QUERYSIBLINGS:
122            FIXME (propsheet, "Unimplemented msg PSM_QUERYSIBLINGS\n");
123            return 0;
124        case PSM_UNCHANGED:
125            FIXME (propsheet, "Unimplemented msg PSM_UNCHANGED\n");
126            return 0;
127        case PSM_APPLY:
128            FIXME (propsheet, "Unimplemented msg PSM_APPLY\n");
129            return 0;
130        case PSM_SETTITLE32A:
131            FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32A\n");
132            return 0;
133        case PSM_SETTITLE32W:
134            FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32W\n");
135            return 0;
136        case PSM_SETWIZBUTTONS:
137            FIXME (propsheet, "Unimplemented msg PSM_SETWIZBUTTONS\n");
138            return 0;
139        case PSM_PRESSBUTTON:
140            FIXME (propsheet, "Unimplemented msg PSM_PRESSBUTTON\n");
141            return 0;
142        case PSM_SETCURSELID:
143            FIXME (propsheet, "Unimplemented msg PSM_SETCURSELID\n");
144            return 0;
145        case PSM_SETFINISHTEXT32A:
146            FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32A\n");
147            return 0;
148        case PSM_SETFINISHTEXT32W:
149            FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32W\n");
150            return 0;
151        case PSM_GETTABCONTROL:
152            FIXME (propsheet, "Unimplemented msg PSM_GETTABCONTROL\n");
153            return 0;
154        case PSM_ISDIALOGMESSAGE:
155            FIXME (propsheet, "Unimplemented msg PSM_ISDIALOGMESSAGE\n");
156            return 0;
157        case PSM_GETCURRENTPAGEHWND:
158            FIXME (propsheet, "Unimplemented msg PSM_GETCURRENTPAGEHWND\n");
159            return 0;
160
161        default:
162         if (uMsg >= WM_USER)
163             ERR (propsheet, "unknown msg %04x wp=%08x lp=%08lx\n",
164                  uMsg, wParam, lParam);
165             return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
166     }
167 }
168
169
170 VOID
171 PROPSHEET_Register (VOID)
172 {
173     WNDCLASS32A wndClass;
174
175     if (GlobalFindAtom32A (WC_PROPSHEET32A)) return;
176
177     ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
178     wndClass.style         = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
179     wndClass.lpfnWndProc   = (WNDPROC32)PROPSHEET_WindowProc;
180     wndClass.cbClsExtra    = 0;
181     wndClass.cbWndExtra    = sizeof(PROPSHEET_INFO *);
182     wndClass.hCursor       = LoadCursor32A (0, IDC_ARROW32A);
183     wndClass.hbrBackground = 0;
184     wndClass.lpszClassName = WC_PROPSHEET32A;
185
186     RegisterClass32A (&wndClass);
187 }
188
189
190 VOID
191 PROPSHEET_UnRegister (VOID)
192 {
193     if (GlobalFindAtom32A (WC_PROPSHEET32A))
194         UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL);
195 }