Jump to content
  • Advertisement
Sign in to follow this  
gargling_mayonnaise

force redraw

This topic is 3640 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Simply invalidate them and it will force a repaint.

For a specific area of specific windows you iterate through all the windows calling InvalidateRgn() or InvalidateRect().

If you just want to invalidate that part of ALL windows (rather than just those below it) leave the hWnd parameter as NULL.

Share this post


Link to post
Share on other sites
Oh man, it doesn't work, here is a snips of what i do:



HWND hW = hWnd;

while ( (hW2 = GetNextWindow(hW,GW_HWNDNEXT)) != NULL ) {

if (hW2!=NULL) {

DWORD st = GetWindowLongPtr(hW2,GWL_STYLE);

// only top & visible windows
if ( (st&WS_OVERLAPPEDWINDOW) && (st&WS_VISIBLE) ) {
InvalidateRect(hW2,NULL,true);
}

hW = hW2;
}

}




Nothing happens, i do that when my window become active(WM_NCACTIVE message) i'd like to force all windows below me to be redrawn on top of me so that at that moment my window has been totally removed.

cheers

Share this post


Link to post
Share on other sites
How are you drawing your window? Are you drawing it inside your message proc in the WM_PAINT message? If you are, you can resend a WM_PAINT message to your window when you want to redraw.

Share this post


Link to post
Share on other sites
Nope, i'm only drawing over the non-client area, i've overridden the ncpaint only, i'm hooking a different window not mine, i think there isn't much left to do with it, i've tried so many different ways without any good result so far, just last few tries and i think not to go any further with it, anyway thank you dude!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!