Index: /trunk/src/kernel32/cvtcursor.cpp
===================================================================
--- /trunk/src/kernel32/cvtcursor.cpp	(revision 1035)
+++ /trunk/src/kernel32/cvtcursor.cpp	(revision 1036)
@@ -1,3 +1,3 @@
-/* $Id: cvtcursor.cpp,v 1.3 1999-09-04 12:41:45 sandervl Exp $ */
+/* $Id: cvtcursor.cpp,v 1.4 1999-09-24 22:47:00 sandervl Exp $ */
 
 /*
@@ -56,4 +56,5 @@
 
   cursorhdr  = (BITMAPFILEHEADER2 *)malloc(cursorsize);
+  memset(cursorhdr, 0, cursorsize);
   cursorhdr->usType        = BFT_POINTER;
   cursorhdr->cbSize        = sizeof(BITMAPFILEHEADER2);
@@ -68,9 +69,11 @@
 
   cursorhdr->offBits       = sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) + offsetBits;
-  cursorhdr->bmp2.cbFix     = sizeof(BITMAPINFOHEADER);
+  cursorhdr->bmp2.cbFix     = sizeof(BITMAPINFOHEADER2);
   cursorhdr->bmp2.cx        = (USHORT)bhdr->biWidth;
   cursorhdr->bmp2.cy        = (USHORT)(bhdr->biHeight);
   cursorhdr->bmp2.cPlanes   = bhdr->biPlanes;
   cursorhdr->bmp2.cBitCount = bhdr->biBitCount;
+  cursorhdr->bmp2.ulCompression   = BCA_UNCOMP;
+  cursorhdr->bmp2.ulColorEncoding = BCE_RGB;
   dprintf(("Cursor size    : %d", bhdr->biSizeImage));
   dprintf(("Cursor Width   : %d", bhdr->biWidth));
Index: /trunk/src/kernel32/cvtcursorgrp.cpp
===================================================================
--- /trunk/src/kernel32/cvtcursorgrp.cpp	(revision 1035)
+++ /trunk/src/kernel32/cvtcursorgrp.cpp	(revision 1036)
@@ -1,3 +1,3 @@
-/* $Id: cvtcursorgrp.cpp,v 1.4 1999-09-21 08:24:53 sandervl Exp $ */
+/* $Id: cvtcursorgrp.cpp,v 1.5 1999-09-24 22:47:00 sandervl Exp $ */
 
 /*
@@ -36,5 +36,5 @@
  CursorResDir *rdir = (CursorResDir *)(chdr + 1);
  int i, groupsize = 0, os2cursorsize;
- BITMAPARRAYFILEHEADER *bafh, *orgbafh;
+ BITMAPARRAYFILEHEADER2 *bafh, *orgbafh;
  CursorComponent       *cursorhdr;
  Win32Resource         *winres;
@@ -56,5 +56,5 @@
         rdir++;
   }
-  bafh    = (BITMAPARRAYFILEHEADER *)malloc(groupsize+chdr->cwCount*sizeof(BITMAPARRAYFILEHEADER));
+  bafh    = (BITMAPARRAYFILEHEADER2 *)malloc(groupsize+chdr->cwCount*sizeof(BITMAPARRAYFILEHEADER2));
   orgbafh = bafh;
 
@@ -62,5 +62,5 @@
   for(i=0;i<chdr->cwCount;i++) {
         bafh->usType    = BFT_BITMAPARRAY;
-        bafh->cbSize    = sizeof(BITMAPARRAYFILEHEADER);
+        bafh->cbSize    = sizeof(BITMAPARRAYFILEHEADER2);
         bafh->cxDisplay = 0;
         bafh->cyDisplay = 0;
@@ -75,5 +75,5 @@
 
 	cursorhdr = (CursorComponent *)winres->lockResource();
-	os2cursor = ConvertCursor(cursorhdr, winres->getSize(), &os2cursorsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER)-sizeof(BITMAPFILEHEADER));
+	os2cursor = ConvertCursor(cursorhdr, winres->getSize(), &os2cursorsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER));
 
         if(os2cursor == NULL) {
@@ -85,12 +85,12 @@
 
         if(i != chdr->cwCount -1) {
-                bafh->offNext = (int)&bafh->bfh - (int)orgbafh + os2cursorsize;
+                bafh->offNext = (int)&bafh->bfh2 - (int)orgbafh + os2cursorsize;
         }
         else    bafh->offNext = 0;
 
-        memcpy((char *)&bafh->bfh, os2cursor, os2cursorsize);
+        memcpy((char *)&bafh->bfh2, os2cursor, os2cursorsize);
 	free(os2cursor);
 
-        bafh = (BITMAPARRAYFILEHEADER *)((int)&bafh->bfh + os2cursorsize);
+        bafh = (BITMAPARRAYFILEHEADER2 *)((int)&bafh->bfh2 + os2cursorsize);
 	delete winres;
 
Index: /trunk/src/user32/oslibres.cpp
===================================================================
--- /trunk/src/user32/oslibres.cpp	(revision 1035)
+++ /trunk/src/user32/oslibres.cpp	(revision 1036)
@@ -1,3 +1,3 @@
-/* $Id: oslibres.cpp,v 1.2 1999-09-21 08:24:04 sandervl Exp $ */
+/* $Id: oslibres.cpp,v 1.3 1999-09-24 22:45:26 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -139,4 +139,5 @@
  POINTERINFO pointerInfo = {0};
  HBITMAP     hbmColor;
+ BITMAPARRAYFILEHEADER2 *bafh = (BITMAPARRAYFILEHEADER2 *)cursorbitmap;
  BITMAPFILEHEADER2 *bfh = (BITMAPFILEHEADER2 *)cursorbitmap;
  HPS         hps;
@@ -147,8 +148,15 @@
     	return 0;
     }
+    if(bafh->usType == BFT_BITMAPARRAY && bafh->cbSize == sizeof(BITMAPARRAYFILEHEADER2)) {
+    	bfh  = &bafh->bfh2;
+    }
+    else {//single icon
+    	bfh  = (BITMAPFILEHEADER2 *)cursorbitmap;
+	bafh = (BITMAPARRAYFILEHEADER2 *)bfh; //for calculation bitmap offset
+    }
     //skip xor/and mask
     hps = WinGetScreenPS(HWND_DESKTOP);
     hbmColor = GpiCreateBitmap(hps, &bfh->bmp2, CBM_INIT,
-                           (char *)bfh + bfh->offBits,
+                               (char *)bafh + bfh->offBits,
                                (BITMAPINFO2 *)&bfh->bmp2);
     if(hbmColor == GPI_ERROR) {
Index: /trunk/src/user32/user32.cpp
===================================================================
--- /trunk/src/user32/user32.cpp	(revision 1035)
+++ /trunk/src/user32/user32.cpp	(revision 1036)
@@ -1,3 +1,3 @@
-/* $Id: user32.cpp,v 1.28 1999-09-21 17:04:27 dengert Exp $ */
+/* $Id: user32.cpp,v 1.29 1999-09-24 22:45:27 sandervl Exp $ */
 
 /*
@@ -678,5 +678,5 @@
 {
 #ifdef DEBUG
-    WriteLog("USER32:  SetCursor\n");
+    WriteLog("USER32: SetCursor %x\n", hcur);
 #endif
     return O32_SetCursor(hcur);
Index: /trunk/src/user32/win32wbase.cpp
===================================================================
--- /trunk/src/user32/win32wbase.cpp	(revision 1035)
+++ /trunk/src/user32/win32wbase.cpp	(revision 1036)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.9 1999-09-24 12:47:50 sandervl Exp $ */
+/* $Id: win32wbase.cpp,v 1.10 1999-09-24 22:45:27 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -1364,11 +1364,11 @@
         case WM_CREATE:
         {
-                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
-                        dprintf(("WM_CREATE returned FALSE\n"));
-                        return(0); //don't create window
+                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == -1) {
+                        dprintf(("WM_CREATE returned -1\n"));
+                        return(-1); //don't create window
                 }
                 NotifyParent(Msg, wParam, lParam);
 
-                return(1);
+                return(0);
         }
         case WM_SETTEXT: //TODO: Nothing happens if passed to DefWindowProc
@@ -1405,11 +1405,11 @@
         case WM_CREATE:
         {
-                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
-                        dprintf(("WM_CREATE returned FALSE\n"));
-                        return(0); //don't create window
+                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == -1) {
+                        dprintf(("WM_CREATE returned -1\n"));
+                        return(-1); //don't create window
                 }
                 NotifyParent(Msg, wParam, lParam);
 
-                return(1);
+                return(0);
         }
         case WM_LBUTTONDOWN:
@@ -1443,11 +1443,11 @@
         case WM_CREATE:
         {
-                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
-                        dprintf(("WM_CREATE returned FALSE\n"));
-                        return(0); //don't create window
+                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == -1) {
+                        dprintf(("WM_CREATE returned -1\n"));
+                        return(-1); //don't create window
                 }
                 NotifyParent(Msg, wParam, lParam);
 
-                return(1);
+                return(0);
         }
         case WM_LBUTTONDOWN:
Index: /trunk/src/user32/window.cpp
===================================================================
--- /trunk/src/user32/window.cpp	(revision 1035)
+++ /trunk/src/user32/window.cpp	(revision 1036)
@@ -1,3 +1,3 @@
-/* $Id: window.cpp,v 1.6 1999-09-23 10:33:59 sandervl Exp $ */
+/* $Id: window.cpp,v 1.7 1999-09-24 22:45:28 sandervl Exp $ */
 /*
  * Win32 window apis for OS/2
@@ -68,5 +68,5 @@
     cs.lpszClass      = className;
     cs.dwExStyle      = exStyle;
-    dprintf(("CreateWindowExA: (%d,%d) (%d,%d), %x %x", x, y, width, height, style, exStyle));
+    dprintf(("CreateWindowExA: parent %x (%d,%d) (%d,%d), %x %x", parent, x, y, width, height, style, exStyle));
 
     //TODO: According to the docs className can be a 16 bits atom
