Changed some treeview related definitions.
[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 "windows.h"
12 #include "commctrl.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, PROPSHEET_WindowProc, (LPARAM) lppsh );
39                 ShowWindow32 (hwnd, TRUE);
40         } else {
41                 hwnd =  DialogBoxParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
42                     lppsh->hwndParent, PROPSHEET_WindowProc, (LPARAM) lppsh );
43         }
44     return hwnd;
45 }
46
47 /*****************************************************************
48  *            PropertySheet32W   (COMCTL32.85)
49  */
50 INT32 WINAPI PropertySheet32W(LPCPROPSHEETHEADER32W propertySheetHeader)
51 {
52     FIXME(propsheet, "(%p): stub\n", propertySheetHeader);
53
54     return -1;
55 }
56
57
58
59
60
61 /*****************************************************************
62  *            CreatePropertySheetPage32A   (COMCTL32.19)(COMCTL32.18)
63  */
64 HPROPSHEETPAGE WINAPI CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A lpPropSheetPage)
65 {
66     FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
67
68     return 0;
69 }
70
71 /*****************************************************************
72  *            CreatePropertySheetPage32W   (COMCTL32.20)
73  */
74 HPROPSHEETPAGE WINAPI CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W lpPropSheetPage)
75 {
76     FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
77
78     return 0;
79 }
80
81 /*****************************************************************
82  *            DestroyPropertySheetPage32   (COMCTL32.24)
83  */
84 BOOL32 WINAPI DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage)
85 {
86     FIXME(propsheet, "(0x%x): stub\n", hPropPage);
87
88     return FALSE;
89 }
90
91
92
93 LRESULT WINAPI
94 PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
95 {
96     WND *wndPtr = WIN_FindWndPtr(hwnd);
97
98     switch (uMsg) {
99        case PSM_SETCURSEL:
100            FIXME (propsheet, "Unimplemented msg PSM_SETCURSEL\n");
101            return 0;
102        case PSM_REMOVEPAGE:
103            FIXME (propsheet, "Unimplemented msg PSM_REMOVEPAGE\n");
104            return 0;
105        case PSM_ADDPAGE:
106            FIXME (propsheet, "Unimplemented msg PSM_ADDPAGE\n");
107            return 0;
108        case PSM_CHANGED:
109            FIXME (propsheet, "Unimplemented msg PSM_CHANGED\n");
110            return 0;
111        case PSM_RESTARTWINDOWS:
112            FIXME (propsheet, "Unimplemented msg PSM_RESTARTWINDOWS\n");
113            return 0;
114        case PSM_REBOOTSYSTEM:
115            FIXME (propsheet, "Unimplemented msg PSM_REBOOTSYSTEM\n");
116            return 0;
117        case PSM_CANCELTOCLOSE:
118            FIXME (propsheet, "Unimplemented msg PSM_CANCELTOCLOSE\n");
119            return 0;
120        case PSM_QUERYSIBLINGS:
121            FIXME (propsheet, "Unimplemented msg PSM_QUERYSIBLINGS\n");
122            return 0;
123        case PSM_UNCHANGED:
124            FIXME (propsheet, "Unimplemented msg PSM_UNCHANGED\n");
125            return 0;
126        case PSM_APPLY:
127            FIXME (propsheet, "Unimplemented msg PSM_APPLY\n");
128            return 0;
129        case PSM_SETTITLE32A:
130            FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32A\n");
131            return 0;
132        case PSM_SETTITLE32W:
133            FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32W\n");
134            return 0;
135        case PSM_SETWIZBUTTONS:
136            FIXME (propsheet, "Unimplemented msg PSM_SETWIZBUTTONS\n");
137            return 0;
138        case PSM_PRESSBUTTON:
139            FIXME (propsheet, "Unimplemented msg PSM_PRESSBUTTON\n");
140            return 0;
141        case PSM_SETCURSELID:
142            FIXME (propsheet, "Unimplemented msg PSM_SETCURSELID\n");
143            return 0;
144        case PSM_SETFINISHTEXT32A:
145            FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32A\n");
146            return 0;
147        case PSM_SETFINISHTEXT32W:
148            FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32W\n");
149            return 0;
150        case PSM_GETTABCONTROL:
151            FIXME (propsheet, "Unimplemented msg PSM_GETTABCONTROL\n");
152            return 0;
153        case PSM_ISDIALOGMESSAGE:
154            FIXME (propsheet, "Unimplemented msg PSM_ISDIALOGMESSAGE\n");
155            return 0;
156        case PSM_GETCURRENTPAGEHWND:
157            FIXME (propsheet, "Unimplemented msg PSM_GETCURRENTPAGEHWND\n");
158            return 0;
159
160        default:
161         if (uMsg >= WM_USER)
162             ERR (propsheet, "unknown msg %04x wp=%08x lp=%08lx\n",
163                  uMsg, wParam, lParam);
164             return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
165     }
166 }
167
168
169 VOID
170 PROPSHEET_Register (VOID)
171 {
172     WNDCLASS32A wndClass;
173
174     if (GlobalFindAtom32A (WC_PROPSHEET32A)) return;
175
176     ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
177     wndClass.style         = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
178     wndClass.lpfnWndProc   = (WNDPROC32)PROPSHEET_WindowProc;
179     wndClass.cbClsExtra    = 0;
180     wndClass.cbWndExtra    = sizeof(PROPSHEET_INFO *);
181     wndClass.hCursor       = LoadCursor32A (0, IDC_ARROW32A);
182     wndClass.hbrBackground = 0;
183     wndClass.lpszClassName = WC_PROPSHEET32A;
184
185     RegisterClass32A (&wndClass);
186 }
187
188
189 VOID
190 PROPSHEET_UnRegister (VOID)
191 {
192     if (GlobalFindAtom32A (WC_PROPSHEET32A))
193         UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL);
194 }