Changeset 1849 for trunk/src/user32/edit.cpp
- Timestamp:
- Nov 26, 1999, 6:06:09 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/user32/edit.cpp (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/edit.cpp
r1828 r1849 1 /* $Id: edit.cpp,v 1.1 7 1999-11-24 18:21:36 cbratschi Exp $ */1 /* $Id: edit.cpp,v 1.18 1999-11-26 17:06:06 cbratschi Exp $ */ 2 2 /* 3 3 * Edit control … … 20 20 21 21 /* CB: todo 22 - WM_MOUSEMOVE: vert lines invalidate bug 22 23 - EN_UPDATE: send before update 23 24 - EN_CHANGE: send after update -> WM_PAINT isn't the right place 24 25 - EN_HSCROLL/EN_VSCROLL: send before update 25 - still problems with caret26 26 - WS_BORDER -> bug in Win32BaseWindow::SetWindowLong 27 - clipping bug(s)28 27 - many messages, styles, notifications 29 28 */ … … 229 228 static LRESULT EDIT_WM_LButtonDown(HWND hwnd, EDITSTATE *es, DWORD keys, INT x, INT y); 230 229 static LRESULT EDIT_WM_LButtonUp(HWND hwnd, EDITSTATE *es, DWORD keys, INT x, INT y); 230 static LRESULT EDIT_WM_CaptureChanged(HWND hwnd,EDITSTATE *es); 231 231 static LRESULT EDIT_WM_MouseMove(HWND hwnd, EDITSTATE *es, DWORD keys, INT x, INT y); 232 232 static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTA cs); … … 671 671 //DPRINTF_EDIT_MSG32("WM_LBUTTONUP"); 672 672 result = EDIT_WM_LButtonUp(hwnd, es, (DWORD)wParam, SLOWORD(lParam), SHIWORD(lParam)); 673 break; 674 675 case WM_CAPTURECHANGED: 676 result = EDIT_WM_CaptureChanged(hwnd,es); 673 677 break; 674 678 … … 1014 1018 { 1015 1019 INT line_index = EDIT_EM_LineIndex(hwnd, es, line); 1016 1020 //CB: fix 1017 1021 if (es->style & ES_MULTILINE) 1018 1022 rc->top = es->format_rect.top + (line - es->y_offset) * es->line_height; … … 1089 1093 if (IntersectRect(&rc, &line_rect, &es->format_rect)) 1090 1094 { 1091 if (es->flags & EF_FOCUSED)HideCaret(hwnd);1095 HideCaret(hwnd); 1092 1096 InvalidateRect(hwnd, &rc, FALSE); 1093 if (es->flags & EF_FOCUSED)ShowCaret(hwnd);1097 ShowCaret(hwnd); 1094 1098 } 1095 1099 } … … 1132 1136 GetClientRect(hwnd, &rc1); 1133 1137 IntersectRect(&rcWnd, &rc1, &es->format_rect); 1134 if (es->flags & EF_FOCUSED)HideCaret(hwnd);1138 HideCaret(hwnd); 1135 1139 if (sl == el) { 1136 1140 EDIT_GetLineRect(hwnd, es, sl, sc, ec, &rcLine); … … 1156 1160 InvalidateRect(hwnd, &rcUpdate, FALSE); 1157 1161 } 1158 if (es->flags & EF_FOCUSED)ShowCaret(hwnd);1162 ShowCaret(hwnd); 1159 1163 } 1160 1164 … … 2087 2091 GetClientRect(hwnd, &rc1); 2088 2092 IntersectRect(&rc, &rc1, &es->format_rect); 2089 rc.top--; //CB: top line not moved/refreshed 2093 2090 2094 ScrollWindowEx(hwnd, -dx, dy, 2091 2095 NULL, &rc, (HRGN)NULL, NULL, SW_INVALIDATE); … … 2851 2855 2852 2856 GetClientRect(hwnd, &rc); 2853 IntersectClipRect(dc, rc.left, rc.top, rc.right, rc.bottom); 2857 IntersectClipRect(dc, rc.left, rc.top, rc.right, rc.bottom); CB: 2854 2858 GetClipBox(dc, &rc); 2855 2859 /* … … 2876 2880 return 0; 2877 2881 2878 //SvL: Bugfix: +12879 2882 len = min(count, lstrlenA(es->text)+1); // determine length 2880 2883 lstrcpynA(text, es->text, len); // copy as much as possible … … 3262 3265 static LRESULT EDIT_WM_LButtonUp(HWND hwnd, EDITSTATE *es, DWORD keys, INT x, INT y) 3263 3266 { 3264 if (es->bCaptureState && GetCapture() == hwnd) { 3265 KillTimer(hwnd, 0); 3266 ReleaseCapture(); 3267 } 3268 es->bCaptureState = FALSE; 3269 3270 return 0; 3271 } 3272 3267 if (es->bCaptureState) 3268 { 3269 KillTimer(hwnd,0); 3270 ReleaseCapture(); 3271 } 3272 es->bCaptureState = FALSE; 3273 3274 return 0; 3275 } 3276 3277 static LRESULT EDIT_WM_CaptureChanged(HWND hwnd,EDITSTATE *es) 3278 { 3279 if (es->bCaptureState) KillTimer(hwnd,0); 3280 es->bCaptureState = FALSE; 3281 3282 return 0; 3283 } 3273 3284 3274 3285 /********************************************************************* … … 3283 3294 INT prex, prey; 3284 3295 3285 if (GetCapture() != hwnd) 3286 return 1; //SvL: Bugfix 3296 if (!es->bCaptureState) return 0; 3287 3297 3288 3298 /* … … 3401 3411 if (es->flags & EF_UPDATE) EDIT_NOTIFY_PARENT(hwnd, EN_UPDATE); 3402 3412 3403 if (es->flags & EF_FOCUSED)HideCaret(hwnd);3413 HideCaret(hwnd); 3404 3414 3405 3415 if (eraseBkGnd) … … 3473 3483 EDIT_SetCaretPos(hwnd, es, es->selection_end,es->flags & EF_AFTER_WRAP); 3474 3484 3475 if (es->flags & EF_FOCUSED)ShowCaret(hwnd);3485 ShowCaret(hwnd); 3476 3486 3477 3487 //CB: replace … … 3490 3500 3491 3501 //CB: original controls redraws many times, cache drawing 3492 if (es->flags & EF_FOCUSED)HideCaret(hwnd);3502 HideCaret(hwnd); 3493 3503 GetClientRect(hwnd,&rect); 3494 3504 hdc = GetDC(hwnd); … … 3503 3513 DeleteDC(hdcCompatible); 3504 3514 ReleaseDC(hwnd,hdc); 3505 if (es->flags & EF_FOCUSED)ShowCaret(hwnd);3515 ShowCaret(hwnd); 3506 3516 } 3507 3517
Note:
See TracChangeset
for help on using the changeset viewer.
