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/static.c b/controls/static.c
index 7af526f..9384040 100644
--- a/controls/static.c
+++ b/controls/static.c
@@ -11,8 +11,6 @@
#include "user.h"
#include "static.h"
-extern void DEFWND_SetText( WND *wndPtr, LPSTR text ); /* windows/defwnd.c */
-
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc );
@@ -70,14 +68,15 @@
/***********************************************************************
* StaticWndProc
*/
-LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- LONG lResult = 0;
- WND *wndPtr = WIN_FindWndPtr(hWnd);
- LONG style = wndPtr->dwStyle & 0x0000000F;
- STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
+ LRESULT lResult = 0;
+ WND *wndPtr = WIN_FindWndPtr(hWnd);
+ LONG style = wndPtr->dwStyle & 0x0000000F;
+ STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
- switch (uMsg) {
+ switch (uMsg)
+ {
case WM_ENABLE:
InvalidateRect32( hWnd, NULL, FALSE );
break;
@@ -95,7 +94,7 @@
}
return 1;
}
- return DefWindowProc(hWnd, uMsg, wParam, lParam);
+ return DefWindowProc16(hWnd, uMsg, wParam, lParam);
case WM_CREATE:
if (style < 0L || style > LAST_STATIC_TYPE)
@@ -114,7 +113,7 @@
if (style == SS_ICON)
DestroyIcon( STATIC_SetIcon( wndPtr, 0 ) );
else
- lResult = DefWindowProc(hWnd, uMsg, wParam, lParam);
+ lResult = DefWindowProc16(hWnd, uMsg, wParam, lParam);
break;
case WM_PAINT:
@@ -174,7 +173,7 @@
break;
default:
- lResult = DefWindowProc(hWnd, uMsg, wParam, lParam);
+ lResult = DefWindowProc16(hWnd, uMsg, wParam, lParam);
break;
}
@@ -186,14 +185,12 @@
{
RECT16 rc;
HBRUSH hBrush;
- char *text;
WORD wFormat;
LONG style = wndPtr->dwStyle;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
GetClientRect16( wndPtr->hwndSelf, &rc);
- text = USER_HEAP_LIN_ADDR( wndPtr->hText );
switch (style & 0x0000000F)
{
@@ -226,15 +223,15 @@
if (infoPtr->hFont) SelectObject( hdc, infoPtr->hFont );
#ifdef WINELIB32
- hBrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
- hdc, wndPtr->hwndSelf );
+ hBrush = SendMessage32A( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
+ hdc, wndPtr->hwndSelf );
#else
- hBrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, (WORD)hdc,
- MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
+ hBrush = SendMessage16( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, (WORD)hdc,
+ MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
#endif
if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH);
FillRect16(hdc, &rc, hBrush);
- if (text) DrawText16( hdc, text, -1, &rc, wFormat );
+ if (wndPtr->text) DrawText16( hdc, wndPtr->text, -1, &rc, wFormat );
}
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
@@ -285,11 +282,11 @@
GetClientRect16( wndPtr->hwndSelf, &rc);
#ifdef WINELIB32
- hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
- hdc, wndPtr->hwndSelf );
+ hbrush = SendMessage32A( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
+ hdc, wndPtr->hwndSelf );
#else
- hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, hdc,
- MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
+ hbrush = SendMessage16( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, hdc,
+ MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
#endif
FillRect16( hdc, &rc, hbrush );
if (infoPtr->hIcon) DrawIcon( hdc, rc.left, rc.top, infoPtr->hIcon );