tune update logical of some controls calling ScrollWindow

This commit is contained in:
Vincent Wei
2022-11-03 16:11:49 +08:00
parent cf49cf2b64
commit 692a6b81e0
6 changed files with 80 additions and 278 deletions
+1 -1
View File
@@ -2133,7 +2133,7 @@ esright_input_char_refresh (HWND hWnd,
scroll_rc.right = cur_caret_x;
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
UpdateWindow(hWnd, FALSE);
UpdateInvalidClient(hWnd, TRUE);
edtSetCaretPos (hWnd, sled);
sled->changed = TRUE;
+1 -1
View File
@@ -1678,7 +1678,7 @@ esright_input_char_refresh (HWND hWnd,
scroll_rc.right = cur_caret_x;
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
UpdateWindow(hWnd, FALSE);
UpdateInvalidClient(hWnd, TRUE);
edtSetCaretPos (hWnd, sled);
sled->changed = TRUE;
+2
View File
@@ -250,6 +250,8 @@ static inline void scrolled_refresh_view (PSCRDATA pscrdata)
rcMargin.right = rcClient.right;
InvalidateRect (pscrdata->hSV, &rcMargin, TRUE);
}
UpdateInvalidClient(pscrdata->hSV, TRUE);
}
/* ------------------------------------------------------------------------- */
+1 -4
View File
@@ -2096,7 +2096,6 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
rcInv.right = ptedata->svdata.scrdata.nContWidth;
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
REFRESH_NODE_EX(node, &rcInv);
// UpdateWindow(hWnd, FALSE);
newlinenr = NODE_LINENR(node);
rcInv.left = 0;
@@ -2104,12 +2103,10 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
rcInv.top += ptedata->nLineHeight;
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
REFRESH_NODE_EX(node, &rcInv);
// UpdateWindow(hWnd, FALSE);
}
/* houhh 20090814, UpdataWindow will invalidate all edit area, but
* erase area is not same with msg_paint area.*/
UpdateWindow(hWnd, FALSE);
//SendMessage(hWnd, MSG_PAINT, 0, 0);
UpdateInvalidClient(hWnd, TRUE);
}
}
else {
+4 -4
View File
@@ -80,17 +80,17 @@ static void update_viewport (gvGridViewData *view, int from, int to, int is_row)
{
RECT r;
GetClientRect (view->hCtrl, &r);
GetClientRect(view->hCtrl, &r);
if (is_row) {
r.top = from;
ScrollWindow (view->hCtrl, 0, to, &r, NULL);
ScrollWindow(view->hCtrl, 0, to, &r, NULL);
}
else {
r.left = from;
ScrollWindow (view->hCtrl, to, 0, &r, NULL);
ScrollWindow(view->hCtrl, to, 0, &r, NULL);
}
UpdateWindow(view->hCtrl, FALSE);
UpdateInvalidClient(view->hCtrl, FALSE);
}
// scroll function {{{
+71 -268
View File
File diff suppressed because it is too large Load Diff