Release 940815
[wine/gsoc-2012-control.git] / controls / widgets.c
blobc6866c696f92614bb3ee3e66e9db4c32d8278539
1 /*
2 * Windows widgets (built-in window classes)
4 * Copyright 1993 Alexandre Julliard
5 */
7 static char Copyright[] = "Copyright Alexandre Julliard, 1993";
9 #include "win.h"
10 #include "desktop.h"
11 #include "mdi.h"
12 #include "gdi.h"
14 LONG ButtonWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
15 LONG StaticWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
16 LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
17 LONG ListBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
18 LONG ComboBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
19 LONG EditWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
20 LONG PopupMenuWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
21 LONG DesktopWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
22 LONG MDIClientWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
25 static WNDCLASS WIDGETS_BuiltinClasses[] =
27 { CS_GLOBALCLASS, (LONG(*)())ButtonWndProc, 0, 2,
28 0, 0, 0, 0, NULL, "BUTTON" },
29 { CS_GLOBALCLASS, (LONG(*)())StaticWndProc, 0, 0,
30 0, 0, 0, 0, NULL, "STATIC" },
31 { CS_GLOBALCLASS, (LONG(*)())ScrollBarWndProc, 0, 8,
32 0, 0, 0, 0, NULL, "SCROLLBAR" },
33 { CS_GLOBALCLASS, (LONG(*)())ListBoxWndProc, 0, 8,
34 0, 0, 0, 0, NULL, "LISTBOX" },
35 { CS_GLOBALCLASS, (LONG(*)())ComboBoxWndProc, 0, 8,
36 0, 0, 0, 0, NULL, "COMBOBOX" },
37 { CS_GLOBALCLASS, (LONG(*)())EditWndProc, 0, 4,
38 0, 0, 0, 0, NULL, "EDIT" },
39 { CS_GLOBALCLASS | CS_SAVEBITS, (LONG(*)())PopupMenuWndProc, 0, 8,
40 0, 0, 0, 0, NULL, POPUPMENU_CLASS_NAME },
41 { CS_GLOBALCLASS, (LONG(*)())DesktopWndProc, 0, sizeof(DESKTOPINFO),
42 0, 0, 0, 0, NULL, DESKTOP_CLASS_NAME },
43 { CS_GLOBALCLASS, (LONG(*)())DefDlgProc, 0, DLGWINDOWEXTRA,
44 0, 0, 0, 0, NULL, DIALOG_CLASS_NAME },
45 { CS_GLOBALCLASS, (LONG(*)())MDIClientWndProc, 0, sizeof(MDICLIENTINFO),
46 0, 0, 0, STOCK_LTGRAY_BRUSH, NULL, "MDICLIENT" }
49 #define NB_BUILTIN_CLASSES \
50 (sizeof(WIDGETS_BuiltinClasses)/sizeof(WIDGETS_BuiltinClasses[0]))
53 /***********************************************************************
54 * WIDGETS_Init
56 * Initialize the built-in window classes.
58 BOOL WIDGETS_Init(void)
60 int i;
61 for (i = 0; i < NB_BUILTIN_CLASSES; i++)
63 if (!RegisterClass(&WIDGETS_BuiltinClasses[i])) return FALSE;
65 return TRUE;