Changeset 1042 for trunk/src


Ignore:
Timestamp:
Sep 25, 1999, 4:18:12 PM (26 years ago)
Author:
sandervl
Message:

Cursor fixes + minor change to RedrawWindow

Location:
trunk/src/user32
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/dc.cpp

    r1000 r1042  
    1 /* $Id: dc.cpp,v 1.3 1999-09-21 17:03:29 dengert Exp $ */
     1/* $Id: dc.cpp,v 1.4 1999-09-25 14:15:36 sandervl Exp $ */
    22
    33/*
     
    10531053
    10541054   SetFS(sel);
     1055   dprintf(("ReleaseDC %x %x", hwnd, hdc));
    10551056   return (rc);
    10561057}
     
    11001101   if (hwnd == NULLHANDLE) {
    11011102      hwnd = HWND_DESKTOP;
    1102       wnd  = NULL;
     1103      wnd  = Win32BaseWindow::GetWindowFromOS2Handle(OSLIB_HWND_DESKTOP);
    11031104   }
    11041105   else
  • trunk/src/user32/loadres.cpp

    r949 r1042  
    1 /* $Id: loadres.cpp,v 1.6 1999-09-15 23:18:52 sandervl Exp $ */
     1/* $Id: loadres.cpp,v 1.7 1999-09-25 14:15:54 sandervl Exp $ */
    22
    33/*
     
    138138        }
    139139    }
    140     dprintf(("LoadCursorA (%X) returned %x\n", hinst, hCursor));
     140    if(HIWORD(lpszCursor)) {
     141         dprintf(("LoadCursorA %s from %x returned %x\n", lpszCursor, hinst, hCursor));
     142    }
     143    else dprintf(("LoadCursorA %x from %x returned %x\n", lpszCursor, hinst, hCursor));
    141144
    142145    return(hCursor);
  • trunk/src/user32/oslibres.cpp

    r1036 r1042  
    1 /* $Id: oslibres.cpp,v 1.3 1999-09-24 22:45:26 sandervl Exp $ */
     1/* $Id: oslibres.cpp,v 1.4 1999-09-25 14:16:05 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    145145
    146146    if(cursorbitmap == NULL) {
    147         dprintf(("OSLibWinCreatePointer cursorbitmap == NULL!!"));
    148         return 0;
     147        dprintf(("OSLibWinCreatePointer cursorbitmap == NULL!!"));
     148        return 0;
    149149    }
    150150    if(bafh->usType == BFT_BITMAPARRAY && bafh->cbSize == sizeof(BITMAPARRAYFILEHEADER2)) {
    151         bfh  = &bafh->bfh2;
     151        bfh  = &bafh->bfh2;
    152152    }
    153153    else {//single icon
    154         bfh  = (BITMAPFILEHEADER2 *)cursorbitmap;
    155         bafh = (BITMAPARRAYFILEHEADER2 *)bfh; //for calculation bitmap offset
     154        bfh  = (BITMAPFILEHEADER2 *)cursorbitmap;
     155    bafh = (BITMAPARRAYFILEHEADER2 *)bfh; //for calculation bitmap offset
    156156    }
    157157    //skip xor/and mask
     
    172172    pointerInfo.hbmPointer = hbmColor;
    173173    hPointer = WinCreatePointerIndirect(HWND_DESKTOP, &pointerInfo);
     174
    174175    if(hPointer == NULL) {
    175176        dprintf(("OSLibWinCreatePointer: WinCreatePointerIndirect failed!"));
     
    186187
    187188    switch(type) {
    188         case IDI_APPLICATION_W:
     189    case IDI_APPLICATION_W:
    189190        os2type = SPTR_PROGRAM;
    190191        break;
     
    214215
    215216    switch(type) {
    216         case IDC_ARROW_W:
     217    case IDC_ARROW_W:
    217218        os2type = SPTR_ARROW;
    218219        break;
    219         case IDC_UPARROW_W:
     220    case IDC_UPARROW_W:
    220221        os2type = SPTR_ARROW;
    221222        break;
    222         case IDC_IBEAM_W:
     223    case IDC_IBEAM_W:
    223224        os2type = SPTR_TEXT;
    224225        break;
    225         case IDC_ICON_W:
     226    case IDC_ICON_W:
    226227        os2type = SPTR_PROGRAM;
    227228        break;
    228         case IDC_NO_W:
     229    case IDC_NO_W:
    229230        os2type = SPTR_ILLEGAL;
    230231        break;
    231         case IDC_CROSS_W:
     232    case IDC_CROSS_W:
    232233        os2type = SPTR_MOVE;
    233234        break;
    234         case IDC_SIZE_W:
     235    case IDC_SIZE_W:
    235236        os2type = SPTR_MOVE;
    236237        break;
    237         case IDC_SIZEALL_W:
     238    case IDC_SIZEALL_W:
    238239        os2type = SPTR_MOVE;
    239240        break;
    240         case IDC_SIZENESW_W:
     241    case IDC_SIZENESW_W:
    241242        os2type = SPTR_SIZENESW;
    242243        break;
    243         case IDC_SIZENS_W:
     244    case IDC_SIZENS_W:
    244245        os2type = SPTR_SIZENS;
    245246        break;
    246         case IDC_SIZENWSE_W:
     247    case IDC_SIZENWSE_W:
    247248        os2type = SPTR_SIZENWSE;
    248249        break;
    249         case IDC_SIZEWE_W:
     250    case IDC_SIZEWE_W:
    250251        os2type = SPTR_SIZEWE;
    251252        break;
    252         case IDC_WAIT_W:
     253    case IDC_WAIT_W:
    253254        os2type = SPTR_WAIT;
    254255        break;
    255         case IDC_APPSTARTING_W:
     256    case IDC_APPSTARTING_W:
    256257        os2type = SPTR_WAIT;
    257258        break;
     
    262263        return 0;
    263264    }
    264     return WinQuerySysPointer(HWND_DESKTOP, os2type, TRUE);
    265 }
    266 //******************************************************************************
    267 //******************************************************************************
     265    //Note: Does not create a copy
     266    return WinQuerySysPointer(HWND_DESKTOP, os2type, FALSE);
     267}
     268//******************************************************************************
     269//******************************************************************************
  • trunk/src/user32/oslibwin.cpp

    r1039 r1042  
    1 /* $Id: oslibwin.cpp,v 1.5 1999-09-25 09:27:07 dengert Exp $ */
     1/* $Id: oslibwin.cpp,v 1.6 1999-09-25 14:18:11 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    6565
    6666        dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER | FCF_NOBYTEALIGN;
    67         dwWinStyle   &= ~WS_CLIPCHILDREN;
     67/////        dwWinStyle   &= ~WS_CLIPCHILDREN;
    6868
    6969        *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle,
  • trunk/src/user32/pmwindow.cpp

    r1039 r1042  
    1 /* $Id: pmwindow.cpp,v 1.6 1999-09-25 09:27:07 dengert Exp $ */
     1/* $Id: pmwindow.cpp,v 1.7 1999-09-25 14:18:11 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    457457        if(WinQueryCapture(HWND_DESKTOP) != NULLHANDLE) {
    458458                goto RunDefWndProc;
    459     }
     459        }
    460460        ULONG keystate = 0;
    461461        if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON1))
     
    471471
    472472        //OS/2 Window coordinates -> Win32 Window coordinates
    473         //TODO: What do windows apps that handle this messages return?
    474         if(!win32wnd->MsgMouseMove(keystate, SHORT1FROMMP(mp1), MapOS2ToWin32Y(win32wnd, SHORT2FROMMP(mp1)))) {
    475                 goto RunDefWndProc;
    476         }
     473        //NOTE: Do not call the default OS/2 window handler as that one changes
     474        //      the mousepointer!
     475        win32wnd->MsgMouseMove(keystate, SHORT1FROMMP(mp1), MapOS2ToWin32Y(win32wnd, SHORT2FROMMP(mp1)));
    477476        break;
    478477    }
     
    718717    case WM_MENUEND:
    719718    case WM_NEXTMENU:
     719        break;
    720720
    721721    case WM_TIMER:
  • trunk/src/user32/user32.cpp

    r1039 r1042  
    1 /* $Id: user32.cpp,v 1.30 1999-09-25 09:27:08 dengert Exp $ */
     1/* $Id: user32.cpp,v 1.31 1999-09-25 14:18:11 sandervl Exp $ */
    22
    33/*
     
    677677HCURSOR WIN32API SetCursor( HCURSOR hcur)
    678678{
    679 #ifdef DEBUG
    680     WriteLog("USER32: SetCursor %x\n", hcur);
    681 #endif
    682     return O32_SetCursor(hcur);
     679 HCURSOR rc;
     680
     681    rc = O32_SetCursor(hcur);
     682    dprintf(("USER32: SetCursor %x (prev %x (%x))\n", hcur, rc, O32_GetCursor()));
     683    return rc;
    683684}
    684685//******************************************************************************
  • trunk/src/user32/window.cpp

    r1039 r1042  
    1 /* $Id: window.cpp,v 1.8 1999-09-25 09:27:08 dengert Exp $ */
     1/* $Id: window.cpp,v 1.9 1999-09-25 14:18:12 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    2929//******************************************************************************
    3030//******************************************************************************
     31#ifdef DEBUG
     32void PrintWindowStyle(DWORD dwStyle, DWORD dwExStyle)
     33{
     34 char style[256] = "";
     35 char exstyle[256] = "";
     36
     37  /* Window styles */
     38  if(dwStyle & WS_CHILD)
     39        strcat(style, "WS_CHILD ");
     40  if(dwStyle & WS_POPUP)
     41        strcat(style, "WS_POPUP ");
     42  if(dwStyle & WS_VISIBLE)
     43        strcat(style, "WS_VISIBLE ");
     44  if(dwStyle & WS_DISABLED)
     45        strcat(style, "WS_DISABLED ");
     46  if(dwStyle & WS_CLIPSIBLINGS)
     47        strcat(style, "WS_CLIPSIBLINGS ");
     48  if(dwStyle & WS_CLIPCHILDREN)
     49        strcat(style, "WS_CLIPCHILDREN ");
     50  if(dwStyle & WS_MAXIMIZE)
     51        strcat(style, "WS_MAXIMIZE ");
     52  if(dwStyle & WS_MINIMIZE)
     53        strcat(style, "WS_MINIMIZE ");
     54  if(dwStyle & WS_GROUP)
     55        strcat(style, "WS_GROUP ");
     56  if(dwStyle & WS_TABSTOP)
     57        strcat(style, "WS_TABSTOP ");
     58
     59  if(dwStyle & WS_CAPTION)
     60        strcat(style, "WS_CAPTION ");
     61  if(dwStyle & WS_DLGFRAME)
     62        strcat(style, "WS_DLGFRAME ");
     63  if(dwStyle & WS_BORDER)
     64        strcat(style, "WS_BORDER ");
     65
     66  if(dwStyle & WS_VSCROLL)
     67        strcat(style, "WS_VSCROLL ");
     68  if(dwStyle & WS_HSCROLL)
     69        strcat(style, "WS_HSCROLL ");
     70  if(dwStyle & WS_SYSMENU)
     71        strcat(style, "WS_SYSMENU ");
     72  if(dwStyle & WS_THICKFRAME)
     73        strcat(style, "WS_THICKFRAME ");
     74  if(dwStyle & WS_MINIMIZEBOX)
     75        strcat(style, "WS_MINIMIZEBOX ");
     76  if(dwStyle & WS_MAXIMIZEBOX)
     77        strcat(style, "WS_MAXIMIZEBOX ");
     78
     79  if(dwExStyle & WS_EX_DLGMODALFRAME)
     80        strcat(exstyle, "WS_EX_DLGMODALFRAME ");
     81  if(dwExStyle & WS_EX_ACCEPTFILES)
     82        strcat(exstyle, "WS_EX_ACCEPTFILES ");
     83  if(dwExStyle & WS_EX_NOPARENTNOTIFY)
     84        strcat(exstyle, "WS_EX_NOPARENTNOTIFY ");
     85  if(dwExStyle & WS_EX_TOPMOST)
     86        strcat(exstyle, "WS_EX_TOPMOST ");
     87  if(dwExStyle & WS_EX_TRANSPARENT)
     88        strcat(exstyle, "WS_EX_TRANSPARENT ");
     89
     90  if(dwExStyle & WS_EX_MDICHILD)
     91        strcat(exstyle, "WS_EX_MDICHILD ");
     92  if(dwExStyle & WS_EX_TOOLWINDOW)
     93        strcat(exstyle, "WS_EX_TOOLWINDOW ");
     94  if(dwExStyle & WS_EX_WINDOWEDGE)
     95        strcat(exstyle, "WS_EX_WINDOWEDGE ");
     96  if(dwExStyle & WS_EX_CLIENTEDGE)
     97        strcat(exstyle, "WS_EX_CLIENTEDGE ");
     98  if(dwExStyle & WS_EX_CONTEXTHELP)
     99        strcat(exstyle, "WS_EX_CONTEXTHELP ");
     100  if(dwExStyle & WS_EX_RIGHT)
     101        strcat(exstyle, "WS_EX_RIGHT ");
     102  if(dwExStyle & WS_EX_LEFT)
     103        strcat(exstyle, "WS_EX_LEFT ");
     104  if(dwExStyle & WS_EX_RTLREADING)
     105        strcat(exstyle, "WS_EX_RTLREADING ");
     106  if(dwExStyle & WS_EX_LTRREADING)
     107        strcat(exstyle, "WS_EX_LTRREADING ");
     108  if(dwExStyle & WS_EX_LEFTSCROLLBAR)
     109        strcat(exstyle, "WS_EX_LEFTSCROLLBAR ");
     110  if(dwExStyle & WS_EX_RIGHTSCROLLBAR)
     111        strcat(exstyle, "WS_EX_RIGHTSCROLLBAR ");
     112  if(dwExStyle & WS_EX_CONTROLPARENT)
     113        strcat(exstyle, "WS_EX_CONTROLPARENT ");
     114  if(dwExStyle & WS_EX_STATICEDGE)
     115        strcat(exstyle, "WS_EX_STATICEDGE ");
     116  if(dwExStyle & WS_EX_APPWINDOW)
     117        strcat(exstyle, "WS_EX_APPWINDOW ");
     118
     119  dprintf(("Window style:   %x %s", dwStyle, style));
     120  dprintf(("Window exStyle: %x %s", dwExStyle, exstyle));
     121}
     122#endif
     123//******************************************************************************
     124//******************************************************************************
    31125HWND WIN32API CreateWindowExA(DWORD exStyle, LPCSTR className,
    32126                              LPCSTR windowName, DWORD style, INT x,
     
    38132  ATOM classAtom;
    39133  CREATESTRUCTA cs;
     134
     135#ifdef DEBUG
     136    PrintWindowStyle(style, exStyle);
     137#endif
    40138
    41139    if(exStyle & WS_EX_MDICHILD)
     
    69167    cs.lpszClass      = className;
    70168    cs.dwExStyle      = exStyle;
    71     dprintf(("CreateWindowExA: parent %x (%d,%d) (%d,%d), %x %x", parent, x, y, width, height, style, exStyle));
     169    if(HIWORD(className)) {
     170         dprintf(("CreateWindowExA: class %s parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle));
     171    }
     172    else dprintf(("CreateWindowExA: class %d parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle));
    72173
    73174    //TODO: According to the docs className can be a 16 bits atom
     
    817918//******************************************************************************
    818919//******************************************************************************
    819 HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT  arg2)
    820 {
    821 #ifdef DEBUG
    822     WriteLog("USER32:  ChildWindowFromPoint\n");
    823 #endif
    824     return O32_ChildWindowFromPoint(arg1, arg2);
     920HWND WIN32API ChildWindowFromPoint( HWND hwnd, POINT pt)
     921{
     922    dprintf(("USER32:  ChildWindowFromPoint\n"));
     923//    return O32_ChildWindowFromPoint(arg1, arg2);
     924    return ChildWindowFromPointEx(hwnd, pt, 0);
    825925}
    826926//******************************************************************************
     
    848948        POINT absolutePt;
    849949
    850         dprintf(("USER32: ChildWindowFromPointEx(%08xh,%08xh,%08xh).\n",
     950        dprintf(("ChildWindowFromPointEx(%08xh,%08xh,%08xh).\n",
    851951                 hwndParent, pt, uFlags));
    852952
     
    897997                }
    898998
     999                dprintf(("ChildWindowFromPointEx returned %x", hWnd));
    8991000                // found it!
    9001001                return hWnd;
     
    9031004        // the point is in the parentwindow but the parentwindow has no child
    9041005        // at this coordinate
     1006        dprintf(("ChildWindowFromPointEx returned parent %x", hwndParent));
    9051007        return hwndParent;
    9061008}
Note: See TracChangeset for help on using the changeset viewer.