Release 941107

Sun Nov  6 18:52:04 1994  Alexandre Julliard  (julliard@lamisun.epfl.ch)

	* [objects/oembitmap.c]  (New file)
	Added possibility to use .xpm files for OEM bitmaps.

	* [include/bitmaps/obm*]  (New files)
	Redrawn all OEM bitmaps in xpm format.

	* [objects/font.c]
	Add space for internal leading when using a negative font height.
	Stubs for AddFontResource() and RemoveFontResource().
	Fix in FONT_Init() for uninitialised default font.

	* [windows/dialog.c]
	Make font height negative as it is really a point size and not a
	pixel size; dialogs using 8-point fonts look better now.

	* [windows/graphics.c]
	Fixed the fix :-) for Pie() to make it work for Arc() and Chord() also.

	* [windows/nonclient.c]
	A few changes for new OEM bitmaps.

Sun Nov  6 18:22:18 1994  Michael Patra  <micky@marie.physik.tu-berlin.de>

	* [windows/class.c]
	The names of local classes have to be stored using GlobalAtom*.
	Otherwise they couldn't be accessed from other modules (e.g. BWCC) 

	* [if1632/call.S]
	CallTo16(cx): It's possible to set the contents of the cx-register.

	* [loader/ne_image.c]
	InitNEDLL(): The size of the local heap is now passed in the cx-
	register when initializing a DLL.

	* [memory/heap.c]
	LocalInit(): The case start==0 is now handled in the way it should.

	* [windows/win.c]
	GetWindowLong(): If the adress of the windows function is requested
	it's no longer returned if it's within the Wine code (and therefore
	unreachable by a windows program). This makes Borland's OWL happy.

	* [controls/edit.c]
	EDIT_GetStr(): Added handling for off<0.

Sun Nov  6 17:37:14 1994  Chris Jones  <chrisj@ichips.intel.com>

	* [loader/library.c]
	Fixed infinite loop bug when two DLLs refer to each other (fixes
	hangup of Quicken during loading).

Thu Nov 04 12:00:00 1994  Jan Willamowius  (jan@janhh.sh.sub.de)

	* [misc/dos_fs.c]
	Bug fix: The size of a disk an the available space
	is now returned in bytes instead of (incorrectly)
	KBytes.

Thu Nov 03 12:00:00 1994  Jan Willamowius  (jan@janhh.sh.sub.de)

	* [windows/graphics.c]
	Bug fix: Pie segments are now filled with correct brush.

Thu Nov  3 10:40:09 1994  Martin von Loewis  (martin@cs.csufresno.edu)

        * [Imakefile]
        generate rc.o before loader.o

        * [controls/menu.c]
        CopySysMenu: generate SYSMENU on the fly, eliminate hSysMenu

        * [include/resource.h]
        Add struct ResourceTable

        * [loader/bitmap.h]
        Load system bitmaps from sysresbmTable

        * [misc/clipboard.c]
          [windows/event.c]
        IsClipboardFormatAvailable,EVENT_SelectionRequest: bug fixes
        
        * [rc/Imakefile]
        generate rc.o from sysres.o and sysresbm.o. Added -lfl

        * [rc/rc.y]
        change style handling to allow ( S1 | S2 ) | S3

        * [rc/sysres.rc]
          [rc/sysresbm.rc]
        Put bitmaps and icons to sysresbm, everything else to sysres

        * [rc/winerc.c]
          [rc/winerc.h]
        Added -o, -c flags. New function set_out_file. Output to files.

        * [windows/dialog.c]
        DialogBoxIndirectPtr, DialogBoxIndirectParamPtr: New functions 

        * [windows/nonclient.c]
        Create AboutWine dialog from template pointer
diff --git a/windows/nonclient.c b/windows/nonclient.c
index e76e79c..77eda75 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -11,7 +11,6 @@
 #include "message.h"
 #include "sysmetrics.h"
 #include "user.h"
-#include "scroll.h"
 #include "syscolor.h"
 #include "stddebug.h"
 /* #define DEBUG_NONCLIENT /* */
@@ -20,7 +19,6 @@
 
 
 static HBITMAP hbitmapClose = 0;
-static HBITMAP hbitmapMDIClose = 0;
 static HBITMAP hbitmapMinimize = 0;
 static HBITMAP hbitmapMinimizeD = 0;
 static HBITMAP hbitmapMaximize = 0;
@@ -73,6 +71,7 @@
  */
 static void NC_AdjustRect( LPRECT rect, DWORD style, BOOL menu, DWORD exStyle )
 {
+    if (style & WS_ICONIC) return;  /* Nothing to change for an icon */
     if (HAS_DLGFRAME( style, exStyle ))
 	InflateRect( rect, SYSMETRICS_CXDLGFRAME, SYSMETRICS_CYDLGFRAME );
     else
@@ -130,13 +129,6 @@
     WND *wndPtr = WIN_FindWndPtr( hwnd );    
 
     if (!wndPtr) return 0;
-
-    /*
-     * we don't want to change the size if hwnd is an icon since
-     * there are no window manager handles on an icon
-     */
-    if(IsIconic(hwnd)) return 0;
-
     NC_AdjustRect( &tmpRect, wndPtr->dwStyle, FALSE, wndPtr->dwExStyle );
     params->rgrc[0].left   -= tmpRect.left;
     params->rgrc[0].top    -= tmpRect.top;
@@ -168,6 +160,8 @@
     rect->right  = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
     rect->bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
 
+    if (wndPtr->dwStyle & WS_ICONIC) return;  /* No border to remove */
+
       /* Remove frame from rectangle */
     if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
     {
@@ -331,10 +325,10 @@
     RECT rect;
     WND *wndPtr = WIN_FindWndPtr( hwnd );
     NC_GetInsideRect( hwnd, &rect );
-    GRAPH_DrawBitmap( hdc, (wndPtr->dwStyle & WS_CHILD) ?
-		      hbitmapMDIClose : hbitmapClose,
+    GRAPH_DrawBitmap( hdc, hbitmapClose,
 		      rect.left, rect.top,
-		      1, 1, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
+                      (wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0,
+                      SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
 		      down ? NOTSRCCOPY : SRCCOPY );
 }
 
@@ -349,8 +343,8 @@
     GRAPH_DrawBitmap( hdc, (IsZoomed(hwnd) ?
 			    (down ? hbitmapRestoreD : hbitmapRestore) :
 			    (down ? hbitmapMaximizeD : hbitmapMaximize)),
-		     rect.right - SYSMETRICS_CXSIZE - 1, rect.top - 1,
-		     0, 0, SYSMETRICS_CXSIZE+2, SYSMETRICS_CYSIZE+2, SRCCOPY );
+		     rect.right - SYSMETRICS_CXSIZE - 1, rect.top,
+		     0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE, SRCCOPY );
 }
 
 
@@ -364,8 +358,8 @@
     NC_GetInsideRect( hwnd, &rect );
     if (wndPtr->dwStyle & WS_MAXIMIZEBOX) rect.right -= SYSMETRICS_CXSIZE + 1;
     GRAPH_DrawBitmap( hdc, (down ? hbitmapMinimizeD : hbitmapMinimize),
-		     rect.right - SYSMETRICS_CXSIZE - 1, rect.top - 1,
-		     0, 0, SYSMETRICS_CXSIZE+2, SYSMETRICS_CYSIZE+2, SRCCOPY );
+		     rect.right - SYSMETRICS_CXSIZE - 1, rect.top,
+		     0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE, SRCCOPY );
 }
 
 
@@ -489,8 +483,6 @@
     {
 	if (!(hbitmapClose = LoadBitmap( 0, MAKEINTRESOURCE(OBM_CLOSE) )))
 	    return;
-	if (!(hbitmapMDIClose = LoadBitmap( 0, MAKEINTRESOURCE(OBM_OLD_CLOSE) )))
-	    return;
 	hbitmapMinimize  = LoadBitmap( 0, MAKEINTRESOURCE(OBM_REDUCE) );
 	hbitmapMinimizeD = LoadBitmap( 0, MAKEINTRESOURCE(OBM_REDUCED) );
 	hbitmapMaximize  = LoadBitmap( 0, MAKEINTRESOURCE(OBM_ZOOM) );
@@ -646,24 +638,24 @@
  	    if ((wndPtr->dwStyle & WS_HSCROLL) && (wndPtr->scroll_flags & 0x0001))
 			bottom -= SYSMETRICS_CYHSCROLL;
 	    SetRect(&rect2, rect.right - SYSMETRICS_CXVSCROLL, 
-	    	rect.top, rect.right, bottom); 
- 	    StdDrawScrollBar(hwnd, hdc, SB_VERT, &rect2, (LPHEADSCROLL)wndPtr->VScroll);
+	    	rect.top, rect.right+1, bottom+1); 
+ 	    StdDrawScrollBar(hwnd, hdc, SB_VERT, &rect2, wndPtr->VScroll);
  	    }
  	if ((wndPtr->dwStyle & WS_HSCROLL) && wndPtr->HScroll != NULL &&
 	    (wndPtr->scroll_flags & 0x0002)) {
 	    int right = rect.right;
 	    if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->scroll_flags & 0x0001))
 			right -= SYSMETRICS_CYVSCROLL;
-	    SetRect(&rect2, rect.left, rect.bottom - SYSMETRICS_CYHSCROLL,
-		    right, rect.bottom);
-	    StdDrawScrollBar(hwnd, hdc, SB_HORZ, &rect2, (LPHEADSCROLL)wndPtr->HScroll);
+	    SetRect(&rect2, rect.left-1, rect.bottom - SYSMETRICS_CYHSCROLL,
+		    right+1, rect.bottom+1);
+	    StdDrawScrollBar(hwnd, hdc, SB_HORZ, &rect2, wndPtr->HScroll);
 	    }
 
 	if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL) &&
 	    (wndPtr->scroll_flags & 0x0003) == 0x0003) {
 		RECT r = rect;
-		r.left = r.right - SYSMETRICS_CXVSCROLL;
-		r.top  = r.bottom - SYSMETRICS_CYHSCROLL;
+		r.left = r.right - SYSMETRICS_CXVSCROLL + 1;
+		r.top  = r.bottom - SYSMETRICS_CYHSCROLL + 1;
 		FillRect( hdc, &r, sysColorObjects.hbrushScrollbar );
 		}
     }    
@@ -909,7 +901,11 @@
 
     if (GetCapture() != hwnd) SetCapture( hwnd );    
 
-    if (wndPtr->dwStyle & WS_CHILD) hdc = GetDC( wndPtr->hwndParent );
+    if (wndPtr->dwStyle & WS_CHILD)
+    {
+          /* Retrieve a default cache DC (without using the window style) */
+        hdc = GetDCEx( wndPtr->hwndParent, 0, DCX_CACHE );
+    }
     else
     {  /* Grab the server only when moving top-level windows without desktop */
 	hdc = GetDC( 0 );
@@ -1262,8 +1258,10 @@
 
     case SC_SCREENSAVE:
 	if (wParam == SC_ABOUTWINE)
-	    DialogBox( hSysRes, MAKEINTRESOURCE(2), 
+	{   extern char sysres_DIALOG_2[];
+	    DialogBoxIndirectPtr( hSysRes, sysres_DIALOG_2,
 		       hwnd, (WNDPROC)AboutWine_Proc );
+        }
 	break;
     }
     return 0;