Can anyone tell me how to prevent the rebar and listview blinking when I try to size the window? I use SetWindowPos to size them. Here is my piece of code:
.ELSEIF (uMsg == WM_SIZE)
movzx eax, WORD PTR
INVOKE SetWindowPos, hReBar, NULL, 0, 0, eax, 0, SWP_NOZORDER
INVOKE SendMessage, hStatusBar, WM_SIZE, wParam, lParam
INVOKE GetWindowRect, hStatusBar, ADDR rc
movzx esi, WORD PTR
sub esi, rc.bottom
add esi, rc.top
INVOKE GetWindowRect, hReBar, ADDR rc
mov eax, rc.bottom
sub eax, rc.top
add eax, 2
sub esi, eax
movzx ecx, WORD PTR
INVOKE SetWindowPos, hListView, NULL, 0, eax, ecx, esi, SWP_NOZORDER
do a search for "flicker" using the message board search. there's some interesting tricks people have been using to reduce flicker.
smurf
RVA: I've coded almost the same as you, a rebar and status bar, but with a MDI window, and tried several ways to reduce flicker. What really helped me is setting the WS_CLIPSIBLINGS style for every window and also the WS_CLIPCHILDREN style for windows with children. This almost eliminated flicker for me, except for the toolbar on my rebar. You can solve this by resizing the rebar horizontally much larger than the actual parent window, and then never resize it in WM_SIZE.
Thomas
i have an example from Chriss Hobs caled ESF.zip it TOTALY eliminates flicker in any GDI window ;) i can email it to you ...or to Iczelion to place it on his downloads ...hope Chriss will not be offended ;(