Ignore:
Timestamp:
Jul 20, 2000, 8:08:13 PM (25 years ago)
Author:
sandervl
Message:

SetWindowPlacement, CreateCaret & Set/GetCaretPos fixes

File:
1 edited

Legend:

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

    r2804 r3873  
    1 /* $Id: caret.cpp,v 1.12 2000-02-16 14:34:04 sandervl Exp $ */
     1/* $Id: caret.cpp,v 1.13 2000-07-20 18:08:12 sandervl Exp $ */
    22
    33/*
     
    1313#include <os2sel.h>
    1414#include <stdlib.h>
    15 #include "win32type.h"
     15#include <win32type.h>
     16#include <win32api.h>
    1617#include <winconst.h>
    1718#include <wprocess.h>
     
    6263       wnd->SetFakeOpen32();
    6364
    64        rc = _O32_CreateCaret (wnd->getOS2WindowHandle(), hBmp, width, height);
     65       rc = O32_CreateCaret (wnd->getOS2WindowHandle(), hBmp, width, height);
    6566       if (rc)
    6667       {
     
    9899   BOOL rc;
    99100
    100    dprintf(("USER32:  SetCaretBlinkTime"));
     101   dprintf(("USER32: SetCaretBlinkTime %d ms", mSecs));
    101102
    102103   rc = _SetCaretBlinkTime (mSecs);
     
    123124   POINTL     caretPos = { x, y };
    124125
    125    dprintf(("USER32:  SetCaretPos"));
     126   dprintf(("USER32: SetCaretPos (%d,%d)", x, y));
    126127
    127128   rc = WinQueryCursorInfo (HWND_DESKTOP, &cursorInfo);
     
    138139           if (!pHps)
    139140           {
    140               _O32_SetLastError (ERROR_INTERNAL_ERROR);
     141              SetLastError(ERROR_INTERNAL_ERROR);
    141142              return FALSE;
    142143           }
     
    151152        else
    152153        {
    153            long height = wnd->getClientHeight();
     154           long height = wnd->getWindowHeight();
    154155           caretPos.y = height - caretPos.y - 1;
    155156           xNew = caretPos.x;
     
    166167   if (rc == FALSE)
    167168   {
    168       _O32_SetLastError (ERROR_INVALID_PARAMETER);
     169      SetLastError (ERROR_INVALID_PARAMETER);
    169170      result = FALSE;
    170171   }
     
    199200            cursorInfo.x = caretPos.x;
    200201            cursorInfo.y = caretPos.y;
    201          } else {
    202             long height  = wnd->getClientHeight();
     202         }
     203         else {
     204            long height  = wnd->getWindowHeight();
    203205            caretPos.y  += cursorInfo.cy;
    204206            cursorInfo.y = height - caretPos.y - 1;
Note: See TracChangeset for help on using the changeset viewer.