Changeset 4976 for trunk/src


Ignore:
Timestamp:
Jan 20, 2001, 12:03:45 AM (25 years ago)
Author:
sandervl
Message:

Get/SetCaretPos fixes

Location:
trunk/src/user32
Files:
2 edited

Legend:

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

    r4848 r4976  
    1 /* $Id: caret.cpp,v 1.15 2000-12-29 18:39:58 sandervl Exp $ */
     1/* $Id: caret.cpp,v 1.16 2001-01-19 23:03:45 sandervl Exp $ */
    22
    33/*
     
    158158        {
    159159           long height = wnd->getWindowHeight();
    160            caretPos.y = height - caretPos.y - 1;
    161            xNew = caretPos.x;
     160           caretPos.y = height - (caretPos.y + wnd->getClientRectPtr()->top) - 1;
     161           xNew = caretPos.x + wnd->getClientRectPtr()->left;
    162162           yNew = caretPos.y - cursorInfo.cy;
    163163        }
     
    183183   CURSORINFO cursorInfo;
    184184
    185    dprintf(("USER32:  GetCaretPos"));
     185   dprintf(("USER32: GetCaretPos"));
    186186
    187187   if (WinQueryCursorInfo (HWND_DESKTOP, &cursorInfo))
     
    195195         if (wnd && wnd->isOwnDC())
    196196            hps = wnd->getOwnDC();
    197          else
    198          {
    199            return FALSE;
     197
     198         if(wnd == NULL) {
     199            dprintf(("ERROR: GetCaretPos: wnd == NULL!"));
     200            return FALSE;
    200201         }
    201202
     
    207208         }
    208209         else {
    209             long height  = wnd->getWindowHeight();
    210             caretPos.y  += cursorInfo.cy;
    211             cursorInfo.y = height - caretPos.y - 1;
     210            long height   = wnd->getWindowHeight();
     211            caretPos.y   += cursorInfo.cy;
     212            cursorInfo.y  = height - caretPos.y - wnd->getClientRectPtr()->top - 1;
     213            cursorInfo.x -= wnd->getClientRectPtr()->left;
    212214         }
    213215      }
  • trunk/src/user32/win32wbase.cpp

    r4945 r4976  
    1 /* $Id: win32wbase.cpp,v 1.229 2001-01-14 17:15:47 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.230 2001-01-19 23:03:45 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    19051905                    point.x = pt.x;
    19061906                    point.y = pt.y;
    1907             MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1);
     1907                    MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1);
    19081908                    NotifyParent(Msg,wParam,MAKELPARAM(point.x,point.y));
    19091909                }
Note: See TracChangeset for help on using the changeset viewer.