Release 960521 Tue May 21 14:06:07 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/button.c] Made ButtonWndProc a 32-bit window procedure. * [controls/desktop.c] Made DesktopWndProc a 32-bit window procedure. Added handling of WM_SETCURSOR. * [controls/menu.c] Allocate menu items and strings on the 32-bit system heap. Implemented Win32 versions for ChangeMenu, InsertMenu, ModifyMenu, AppendMenu and LoadMenuIndirect. * [controls/widgets.c] Added possibility to have 32-bit built-in classes. * [files/drive.c] Implemented GetLogicalDrive() and GetLogicalDriveStrings(). * [misc/spy.c] [include/spy.h] Added support for spying Win32 messages. * [loader/builtin.c] Fixed bug in -dll option parsing. * [memory/local.c] Added back the change by Huw D. M. Davies to free the block in LocalRealloc() before allocating the new one. * [objects/bitmap.c] [objects/cursoricon.c] [objects/oembitmap.c] Fixed bug in bitmap size that caused memory corruption for 24bpp. * [windows/defwnd.c] Implemented Win32 version of DefWindowProc(). * [windows/dialog.c] Implemented Win32 version of SendDlgItemMessage, Get/SetDlgItemText and Get/SetDlgItemInt. * [windows/mdi.c] Implemented Win32 version of DefFrameProc() and DefMDIChildProc(). Don't make a copy of the OBM bitmaps for every MDI window. * [windows/message.c] Implemented Win32 version of SendMessage(). * [windows/winproc.c] [windows/class.c] [windows/win.c] New scheme for 32-bit window procedures to replace aliases. All 32-bit window procedure get a 16-bit address pointing to a WINDOWPROC structure. Implemented Ansi<->Unicode translation for CallWindowProc(). Added translation of WM_DRAWITEM between Win16 and Win32. * [windows/win.c] [include/callback.h] Added ugly hack to build CREATESTRUCT on the stack when sending WM_NCCREATE. Implemented Win32 version of Get/SetWindowWord/Long and Get/SetWindowText. Fri May 17 10:20:16 1996 Albrecht Kleine <kleine@ak.sax.de> * [controls/button.c] Avoid gray text on gray background in disabled push buttons using a b/w raster and some raster operations (PatBlt,BitBlt). * [objects/text.c] DrawText(): don't draw an underbar anymore if DT_CALCRECT is set.
diff --git a/controls/widgets.c b/controls/widgets.c index dc5a441..7205bc0 100644 --- a/controls/widgets.c +++ b/controls/widgets.c
@@ -15,11 +15,8 @@ #include "module.h" #include "heap.h" -static WNDCLASS16 WIDGETS_BuiltinClasses[] = +static WNDCLASS16 WIDGETS_BuiltinClasses16[] = { - { CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, - (WNDPROC16)"ButtonWndProc", 0, sizeof(BUTTONINFO), - 0, 0, 0, 0, 0, (SEGPTR)"BUTTON" }, { CS_GLOBALCLASS | CS_PARENTDC, (WNDPROC16)"StaticWndProc", 0, sizeof(STATICINFO), 0, 0, 0, 0, 0, (SEGPTR)"STATIC" }, @@ -40,16 +37,25 @@ 0, 0, 0, 0, 0, (SEGPTR)"EDIT" }, { CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC16)"PopupMenuWndProc", 0, 8, 0, 0, 0, 0, 0, (SEGPTR)POPUPMENU_CLASS_NAME }, - { CS_GLOBALCLASS, (WNDPROC16)"DesktopWndProc", 0, sizeof(DESKTOPINFO), - 0, 0, 0, 0, 0, (SEGPTR)DESKTOP_CLASS_NAME }, { CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC16)"DefDlgProc", 0, DLGWINDOWEXTRA, 0, 0, 0, 0, 0, (SEGPTR)DIALOG_CLASS_NAME }, { CS_GLOBALCLASS, (WNDPROC16)"MDIClientWndProc", 0, sizeof(MDICLIENTINFO), 0, 0, 0, STOCK_LTGRAY_BRUSH, 0, (SEGPTR)"MDICLIENT" } }; -#define NB_BUILTIN_CLASSES \ - (sizeof(WIDGETS_BuiltinClasses)/sizeof(WIDGETS_BuiltinClasses[0])) +#define NB_BUILTIN_CLASSES16 \ + (sizeof(WIDGETS_BuiltinClasses16)/sizeof(WIDGETS_BuiltinClasses16[0])) + +static WNDCLASS32A WIDGETS_BuiltinClasses32[] = +{ + { CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, + ButtonWndProc, 0, sizeof(BUTTONINFO), 0, 0, 0, 0, 0, "BUTTON" }, + { CS_GLOBALCLASS, DesktopWndProc, 0, sizeof(DESKTOPINFO), + 0, 0, 0, 0, 0, DESKTOP_CLASS_NAME } +}; + +#define NB_BUILTIN_CLASSES32 \ + (sizeof(WIDGETS_BuiltinClasses32)/sizeof(WIDGETS_BuiltinClasses32[0])) /*********************************************************************** @@ -61,17 +67,33 @@ { int i; char *name; - WNDCLASS16 *class = WIDGETS_BuiltinClasses; + WNDCLASS16 *class16 = WIDGETS_BuiltinClasses16; + WNDCLASS32A *class32 = WIDGETS_BuiltinClasses32; if (!(name = SEGPTR_ALLOC( 20 * sizeof(char) ))) return FALSE; - for (i = 0; i < NB_BUILTIN_CLASSES; i++, class++) + + /* Create 16-bit classes */ + + for (i = 0; i < NB_BUILTIN_CLASSES16; i++, class16++) { - strcpy( name, (char *)class->lpszClassName ); - class->lpszClassName = SEGPTR_GET(name); - class->hCursor = LoadCursor( 0, IDC_ARROW ); - class->lpfnWndProc = MODULE_GetWndProcEntry16( (char *)class->lpfnWndProc ); - if (!RegisterClass16( class )) return FALSE; + strcpy( name, (char *)class16->lpszClassName ); + class16->lpszClassName = SEGPTR_GET(name); + class16->hCursor = LoadCursor( 0, IDC_ARROW ); + class16->lpfnWndProc = MODULE_GetWndProcEntry16( (char *)class16->lpfnWndProc ); + if (!RegisterClass16( class16 )) return FALSE; } + + /* Create 32-bit classes */ + + for (i = 0; i < NB_BUILTIN_CLASSES32; i++, class32++) + { + /* Just to make sure the string is > 0x10000 */ + strcpy( name, (char *)class32->lpszClassName ); + class32->lpszClassName = name; + class32->hCursor = LoadCursor( 0, IDC_ARROW ); + if (!RegisterClass32A( class32 )) return FALSE; + } + SEGPTR_FREE(name); return TRUE; }