2 * Windows widgets (built-in window classes)
4 * Copyright 1993 Alexandre Julliard
16 #include "stackframe.h"
18 static WNDCLASS16 WIDGETS_BuiltinClasses[] =
20 { CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
21 (WNDPROC)"ButtonWndProc", 0, sizeof(BUTTONINFO),
22 0, 0, 0, 0, 0, (SEGPTR)"BUTTON" },
23 { CS_GLOBALCLASS | CS_PARENTDC,
24 (WNDPROC)"StaticWndProc", 0, sizeof(STATICINFO),
25 0, 0, 0, 0, 0, (SEGPTR)"STATIC" },
26 { CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
27 (WNDPROC)"ScrollBarWndProc", 0, sizeof(SCROLLINFO),
28 0, 0, 0, 0, 0, (SEGPTR)"SCROLLBAR" },
29 { CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
30 (WNDPROC)"ListBoxWndProc", 0, 8,
31 0, 0, 0, 0, 0, (SEGPTR)"LISTBOX" },
32 { CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
33 (WNDPROC)"ComboBoxWndProc", 0, 8,
34 0, 0, 0, 0, 0, (SEGPTR)"COMBOBOX" },
35 { CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS,
36 (WNDPROC)"ComboLBoxWndProc", 0, 8,
37 0, 0, 0, 0, 0, (SEGPTR)"COMBOLBOX" },
38 { CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
39 (WNDPROC)"EditWndProc", 0, sizeof(DWORD),
40 0, 0, 0, 0, 0, (SEGPTR)"EDIT" },
41 { CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC)"PopupMenuWndProc", 0, 8,
42 0, 0, 0, 0, 0, (SEGPTR)POPUPMENU_CLASS_NAME },
43 { CS_GLOBALCLASS, (WNDPROC)"DesktopWndProc", 0, sizeof(DESKTOPINFO),
44 0, 0, 0, 0, 0, (SEGPTR)DESKTOP_CLASS_NAME },
45 { CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC)"DefDlgProc", 0, DLGWINDOWEXTRA,
46 0, 0, 0, 0, 0, (SEGPTR)DIALOG_CLASS_NAME },
47 { CS_GLOBALCLASS, (WNDPROC)"MDIClientWndProc", 0, sizeof(MDICLIENTINFO),
48 0, 0, 0, STOCK_LTGRAY_BRUSH, 0, (SEGPTR)"MDICLIENT" }
51 #define NB_BUILTIN_CLASSES \
52 (sizeof(WIDGETS_BuiltinClasses)/sizeof(WIDGETS_BuiltinClasses[0]))
55 /***********************************************************************
58 * Initialize the built-in window classes.
60 BOOL WIDGETS_Init(void)
64 WNDCLASS16 *class = WIDGETS_BuiltinClasses;
66 for (i = 0; i < NB_BUILTIN_CLASSES; i++, class++)
68 strcpy( name, (char *)class->lpszClassName );
69 class->lpszClassName = MAKE_SEGPTR(name);
70 class->hCursor = LoadCursor( 0, IDC_ARROW );
71 class->lpfnWndProc = MODULE_GetWndProcEntry16( (char *)class->lpfnWndProc );
72 if (!RegisterClass16( class )) return FALSE;