mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 00:54:18 +08:00
tune update logical of some controls calling ScrollWindow
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user