Release 960516
Thu May 16 13:35:31 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [*/*.c]
Renamed RECT, POINT and SIZE structures to RECT16, POINT16 and
SIZE16. Implemented Win32 version of most functions that take
these types as parameters.
* [configure]
Patched autoconf to attempt to correctly detect -lnsl and
-lsocket. Please check this out.
* [controls/button.c]
Added support for Win32 BM_* messages.
* [controls/menu.c]
Avoid sending extra WM_MENUSELECT messages. This avoids crashes
with Excel.
* [memory.heap.c] [include/heap.h]
Added support for SEGPTRs in Win32 heaps. Added a few macros to
make using SEGPTRs easier. They are a bit slower than MAKE_SEGPTR,
but they work with Win32.
* [memory/atom.c]
Implemented Win32 atom functions.
* [memory/local.c]
Fixed LocalReAlloc() changes to avoid copying the whole block twice.
* [win32/memory.c]
Use /dev/zero instead of MAP_ANON for VirtualAlloc().
* [windows/class.c]
Properly implemented the Win32 class functions.
* [windows/winproc.c] (New file)
New file handling the message translation between Win16 and Win32.
Mon May 13 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [windows/mdi.c] [windows/menu.c]
Improved WM_MDICREATE and WM_MDICASCADE handling.
* [windows/event.c] [objects/bitblt.c]
Handle GraphicsExpose event for BitBlt from screen to screen.
* [windows/event.c] [windows/win.c] [windows/nonclient.c]
Bunch of fixes for problems with -managed.
* [windows/win.c] [windows/winpos.c]
Changed conditions for WM_SIZE, WM_MOVE, and WM_GETMINMAXINFO
in CreateWindow.
* [windows/win.c] [windows/queue.c] [misc/user.c]
Do not send WM_PARENTNOTIFY when in AppExit and call WH_SHELL
on window creation/destruction.
* [objects/palette.c]
Crude RealizePalette(). At least something is visible in LviewPro.
Sun May 12 02:05:00 1996 Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk>
* [if1632/gdi32.spec]
Added Rectangle (use win16 version).
* [if1632/kernel32.spec]
Added GetWindowsDirectoryA (use win16 GetWindowsDirectory).
* [if1632/user32.spec]
Added GetSubMenu, MoveWindow, SetScrollPos, SetScrollRange (use win16
versions).
Added SetWindowsHookExA (empty stub for now).
* [include/handle32.h]
Changed #include <malloc.h> to #include <stdlib.h> to prevent
hate message from FreeBSD compiler.
* [win32/newfns.c]
Added new function SetWindowsHookEx32A (empty stub for now).
* [win32/user32.c]
Removed redundant debugging printf statement.
Sun May 12 01:24:57 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>
* [memory/local.c]
Avoid creating adjacent free blocks.
Free the block in LocalReAlloc() before allocating a new one.
Fixed LocalReAlloc() for discarded blocks.
Fri May 10 23:05:12 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
* [resources/sysres_Fi.rc]
ChooseFont and ChooseColor dialogs updated.
Fri May 10 17:19:33 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c,if1632/kernel.spec]
GetCurrentDirectory(),SetCurrentDirectory() implemented.
* [if1632/advapi32.spec] [if1632/kernel.spec] [if1632/shell.spec]
[include/windows.h] [include/winreg.h] [loader/main.c]
[misc/main.c] [misc/shell.c] [misc/registry.c]
Registry fixes:
- loads win95 registry databases,
- save only updated keys on default,
- now adhers to the new function naming standard,
- minor cleanups.
Tue May 7 22:36:13 1996 Albrecht Kleine <kleine@ak.sax.de>
* [combo.c]
Added WM_COMMAND-handling for interaction between EDIT and COMBOLBOX
and synchronized mine with Greg Kreider's works.
* [commdlg.c]
Bugfix in ChooseFont: font size handling.
diff --git a/windows/scroll.c b/windows/scroll.c
index 4259dbf..5569093 100644
--- a/windows/scroll.c
+++ b/windows/scroll.c
@@ -43,13 +43,13 @@
if( !wndScroll || ( !dx && !dy) ) return 0;
if( dcx & DCX_WINDOW )
- hRgnWnd = CreateRectRgnIndirect(&wndScroll->rectWindow);
+ hRgnWnd = CreateRectRgnIndirect16(&wndScroll->rectWindow);
else
{
- RECT rect;
+ RECT32 rect;
- GetClientRect(hScroll,&rect);
- hRgnWnd = CreateRectRgnIndirect(&rect);
+ GetClientRect32(hScroll,&rect);
+ hRgnWnd = CreateRectRgnIndirect32(&rect);
}
hUpdateRgn = DCE_GetVisRgn( hScroll, dcx );
@@ -101,7 +101,7 @@
}
/* invalidate uncovered region and paint frames */
- b = RedrawWindow( hScroll, NULL, hUpdateRgn, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE |
+ b = RedrawWindow32( hScroll, NULL, hUpdateRgn, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE |
RDW_ERASENOW | RDW_ALLCHILDREN );
DeleteObject( hUpdateRgn);
@@ -115,11 +115,11 @@
* FIXME: a bit broken
*/
-void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect)
+void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT16 rect, LPRECT16 clipRect)
{
HDC hdc;
HRGN hrgnUpdate,hrgnClip;
- RECT rc, cliprc;
+ RECT16 rc, cliprc;
HWND hCaretWnd = CARET_GetHwnd();
dprintf_scroll(stddeb,"ScrollWindow: dx=%d, dy=%d, lpRect =%08lx clipRect=%i,%i,%i,%i\n",
@@ -131,8 +131,8 @@
/* if rect is NULL children have to be moved */
if ( !rect )
{
- GetClientRect(hwnd, &rc);
- hrgnClip = CreateRectRgnIndirect( &rc );
+ GetClientRect16(hwnd, &rc);
+ hrgnClip = CreateRectRgnIndirect16( &rc );
if ((hCaretWnd == hwnd) || IsChild(hwnd,hCaretWnd))
HideCaret(hCaretWnd);
@@ -144,7 +144,7 @@
}
else
{
- GetClientRect(hwnd,&rc);
+ GetClientRect16(hwnd,&rc);
dprintf_scroll(stddeb,"\trect=%i %i %i %i client=%i %i %i %i\n",
(int)rect->left,(int)rect->top,(int)rect->right,
(int)rect->bottom,(int)rc.left,(int)rc.top,
@@ -152,14 +152,14 @@
if (hCaretWnd == hwnd) HideCaret(hCaretWnd);
else hCaretWnd = 0;
- CopyRect(&rc, rect);
+ CopyRect16(&rc, rect);
hdc = GetDC(hwnd);
}
if (clipRect == NULL)
- GetClientRect(hwnd, &cliprc);
+ GetClientRect16(hwnd, &cliprc);
else
- CopyRect(&cliprc, clipRect);
+ CopyRect16(&cliprc, clipRect);
hrgnUpdate = CreateRectRgn(0, 0, 0, 0);
ScrollDC(hdc, dx, dy, &rc, &cliprc, hrgnUpdate, NULL);
@@ -181,7 +181,7 @@
DeleteObject(hrgnInv);
}
- RedrawWindow( hwnd, NULL, hrgnUpdate, RDW_INVALIDATE | RDW_ERASE | RDW_ERASENOW);
+ RedrawWindow32( hwnd, NULL, hrgnUpdate, RDW_INVALIDATE | RDW_ERASE | RDW_ERASENOW);
}
DeleteObject(hrgnUpdate);
@@ -195,24 +195,30 @@
* FIXME: half-broken
*/
-BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT rc, LPRECT cliprc,
- HRGN hrgnUpdate, LPRECT rcUpdate)
+BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT16 rc, LPRECT16 cliprc,
+ HRGN hrgnUpdate, LPRECT16 rcUpdate)
{
- HRGN hrgnClip, hrgn1, hrgn2;
- POINT src, dest;
+ HRGN hrgnClip;
+ POINT16 src, dest;
short width, height;
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
- dprintf_scroll(stddeb,"ScrollDC: dx=%d dy=%d, hrgnUpdate=%04x rc=%d %d %d %d\n",
- dx,dy,hrgnUpdate,((rc)?rc->left:0), ((rc)?rc->top:0),
- ((rc)?rc->right:0), ((rc)?rc->bottom:0));
+ dprintf_scroll(stddeb,"ScrollDC: dx=%d dy=%d, hrgnUpdate=%04x rcUpdate = %p cliprc = %p, rc=%d %d %d %d\n",
+ dx, dy, hrgnUpdate, rcUpdate, cliprc, rc ? rc->left : 0,
+ rc ? rc->top : 0, rc ? rc->right : 0, rc ? rc->bottom : 0 );
if (rc == NULL)
return FALSE;
+ if (!dc)
+ {
+ fprintf(stdnimp,"ScrollDC: Invalid HDC\n");
+ return FALSE;
+ }
+
if (cliprc)
{
- hrgnClip = CreateRectRgnIndirect(cliprc);
+ hrgnClip = CreateRectRgnIndirect16(cliprc);
SelectClipRgn(hdc, hrgnClip);
}
@@ -246,6 +252,8 @@
if (hrgnUpdate)
{
+ HRGN hrgn1,hrgn2;
+
if (dx > 0)
hrgn1 = CreateRectRgn(rc->left, rc->top, rc->left+dx, rc->bottom);
else if (dx < 0)
@@ -265,9 +273,24 @@
RgnType = CombineRgn(hrgnUpdate, hrgn1, hrgn2, RGN_OR);
DeleteObject(hrgn1);
DeleteObject(hrgn2);
+ if (rcUpdate) GetRgnBox16( hrgnUpdate, rcUpdate );
+ }
+ else if (rcUpdate)
+ {
+ RECT16 rx,ry;
+
+ rx = ry = *rc;
+ if( dx > 0 ) rx.right = rc->left+dx;
+ else if (dx < 0) rx.left = rc->right+dx;
+ else SetRectEmpty16( &rx );
+
+ if( dy > 0 ) ry.bottom = rc->top+dy;
+ else if (dy < 0) ry.top = rc->bottom+dy;
+ else SetRectEmpty16( &ry );
+
+ UnionRect16( rcUpdate, &rx, &ry );
}
- if (rcUpdate) GetRgnBox( hrgnUpdate, rcUpdate );
return TRUE;
}
@@ -280,31 +303,31 @@
* SCROLL_TraceChildren can help
*/
-int ScrollWindowEx(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect,
- HRGN hrgnUpdate, LPRECT rcUpdate, WORD flags)
+int ScrollWindowEx(HWND hwnd, short dx, short dy, LPRECT16 rect, LPRECT16 clipRect,
+ HRGN hrgnUpdate, LPRECT16 rcUpdate, WORD flags)
{
HDC hdc;
- RECT rc, cliprc;
+ RECT16 rc, cliprc;
dprintf_scroll(stddeb,"ScrollWindowEx: dx=%d, dy=%d, wFlags=%04x\n",dx, dy, flags);
hdc = GetDC(hwnd);
if (rect == NULL)
- GetClientRect(hwnd, &rc);
+ GetClientRect16(hwnd, &rc);
else
- CopyRect(&rc, rect);
+ CopyRect16(&rc, rect);
if (clipRect == NULL)
- GetClientRect(hwnd, &cliprc);
+ GetClientRect16(hwnd, &cliprc);
else
- CopyRect(&cliprc, clipRect);
+ CopyRect16(&cliprc, clipRect);
ScrollDC(hdc, dx, dy, &rc, &cliprc, hrgnUpdate, rcUpdate);
if (flags | SW_INVALIDATE)
{
- RedrawWindow( hwnd, NULL, hrgnUpdate, RDW_INVALIDATE | RDW_ERASE |
- ((flags & SW_ERASE) ? RDW_ERASENOW : 0));
+ RedrawWindow32( hwnd, NULL, hrgnUpdate, RDW_INVALIDATE | RDW_ERASE |
+ ((flags & SW_ERASE) ? RDW_ERASENOW : 0));
}
ReleaseDC(hwnd, hdc);