Changeset 1944 for trunk/src/user32/caret.cpp
- Timestamp:
- Dec 2, 1999, 5:34:43 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/caret.cpp
r1446 r1944 1 /* $Id: caret.cpp,v 1. 7 1999-10-25 20:17:16 sandervlExp $ */1 /* $Id: caret.cpp,v 1.8 1999-12-02 16:34:43 cbratschi Exp $ */ 2 2 3 3 /* … … 37 37 static int CaretWidth, CaretHeight; 38 38 static int CaretPosX, CaretPosY; 39 static BOOL CaretIsVisible;39 static INT CaretIsVisible; //visible if > 0 40 40 41 41 #pragma data_seg() … … 62 62 if (rc) 63 63 { 64 hwndCaret = hwnd; 65 hbmCaret = hBmp; 66 CaretWidth = width; 67 CaretHeight = height; 64 hwndCaret = hwnd; 65 hbmCaret = hBmp; 66 CaretWidth = width; 67 CaretHeight = height; 68 CaretIsVisible = 0; 68 69 } 69 70 … … 83 84 CaretWidth = 0; 84 85 CaretHeight = 0; 85 CaretIsVisible = FALSE;86 CaretIsVisible = 0; 86 87 87 88 rc = _DestroyCaret(); … … 218 219 dprintf(("USER32: ShowCaret %x", hwnd)); 219 220 220 CaretIsVisible = TRUE; 221 rc = _ShowCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 221 CaretIsVisible++; 222 if (CaretIsVisible == 1) 223 rc = _ShowCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 224 else 225 rc = TRUE; 222 226 223 227 return (rc); … … 230 234 dprintf(("USER32: HideCaret")); 231 235 232 CaretIsVisible = FALSE; 233 rc = _HideCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 236 CaretIsVisible--; 237 if (CaretIsVisible == 0) 238 rc = _HideCaret (Win32BaseWindow::Win32ToOS2Handle (hwnd)); 239 else 240 rc = TRUE; 234 241 235 242 return (rc); … … 239 246 { 240 247 CURSORINFO cursorInfo; 248 INT x; 241 249 242 250 if ((hwndFocus != 0) && (hwndCaret == hwndFocus) && … … 247 255 CreateCaret (hwndCaret, hbmCaret, CaretWidth, CaretHeight); 248 256 SetCaretPos (CaretPosX, CaretPosY); 249 if (CaretIsVisible )250 ShowCaret (hwndCaret);251 } 252 } 257 if (CaretIsVisible > 0) 258 _ShowCaret(Win32BaseWindow::Win32ToOS2Handle(hwndCaret)); 259 } 260 }
Note:
See TracChangeset
for help on using the changeset viewer.