Changeset 4976 for trunk/src/user32/caret.cpp
- Timestamp:
- Jan 20, 2001, 12:03:45 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/caret.cpp
r4848 r4976 1 /* $Id: caret.cpp,v 1.1 5 2000-12-29 18:39:58sandervl Exp $ */1 /* $Id: caret.cpp,v 1.16 2001-01-19 23:03:45 sandervl Exp $ */ 2 2 3 3 /* … … 158 158 { 159 159 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; 162 162 yNew = caretPos.y - cursorInfo.cy; 163 163 } … … 183 183 CURSORINFO cursorInfo; 184 184 185 dprintf(("USER32: 185 dprintf(("USER32: GetCaretPos")); 186 186 187 187 if (WinQueryCursorInfo (HWND_DESKTOP, &cursorInfo)) … … 195 195 if (wnd && wnd->isOwnDC()) 196 196 hps = wnd->getOwnDC(); 197 else 198 { 199 return FALSE; 197 198 if(wnd == NULL) { 199 dprintf(("ERROR: GetCaretPos: wnd == NULL!")); 200 return FALSE; 200 201 } 201 202 … … 207 208 } 208 209 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; 212 214 } 213 215 }
Note:
See TracChangeset
for help on using the changeset viewer.