We paint the objects with begin paint and end paint.
Once, invalidate even a small cursol, all objects will be disapeared. We can draw the wave cursol as like,
*
- | paint |
(drawing) keyup ani-thread |
keyup | thread | - |
1 | rect 15 |
(v) (-) |
no | no animation | |
2 | rect 15 |
(v) (v) |
no | well(not flashing) | |
3 |
rect 17 rect 15 |
(v) (v) |
rect 17 rect 15 |
rect 15 |
flashing |
4 |
rect 17 rect 15 |
(-) (v) |
rect 17 rect 15 |
rect 15 | not displayed |
- |
rect 17: a small band
rect 15: the wave cursol
1. no invalidate
you must recognise if you invaldate the cursol &rect_xy[15] and a whole &RefreshRect.
*
- | - | - | - | - | - |
- | 006-winmainthread_001.cpp (*1) | ||||
- | case WM_KEYUP: //InvalidateRect( p_evt->hWnd, &rect_xy[15], FALSE); InvalidateRect( hWnd, &RefreshRect, TRUE); |
||||
- | |||||
- | |||||
- |
2. no invalidate a little band rect background
- | - | - | - | - | - |
- | 005-20230519-005-01.png 005-winmainthread_001.cpp (*1) |
||||
- | case WM_KEYUP: InvalidateRect( p_evt->hWnd, &rect_xy[15], FALSE); InvalidateRect( p_evt->hWnd, &rect_xy[17], FALSE); |
||||
- | |||||
- | |||||
- |
3. invalidate the cursol with a little band rect background.
*
- | - | - | - | - | - |
- | Flashing (5/19 14:15) 007-winmainthread_001.cpp (*1) |
||||
- |
|
||||
- |
InvalidateRect( p_evt->hWnd, &rect_xy[15], FALSE);
|
||||
- | |||||
- |
4. invalidate the cursol with a little band rect background "key up" only.
*
- | - | - | - | - | - |
- | Not Displayed (5/19 14:18) 008-20230519-005-01.png 008-winmainthread_001.cpp (*1) |
||||
- |
case WM_KEYUP:
DRAW_PARAM = DRAW_PARAM | _DRAW_PARAM_00000000000000000000000000010000_;
InvalidateRect( p_evt->hWnd, &rect_xy[17], FALSE);
|
||||
- |
|
||||
- |
if ( DRAW_PARAM & _DRAW_PARAM_00000000000000000000000000010000_ ) {
//$00000000000000000000000000010000
Rectangle( (HDC) hDC, rect_xy[17].left, rect_xy[17].top, rect_xy[17].right, rect_xy[17].bottom );
DRAW_PARAM -= _DRAW_PARAM_00000000000000000000000000010000_;
printf("00000000000000000000000000010000\r\n");
}
|
||||
- |
(*1)
If we blank that line like C++,