From: mikew on

> I infer that you have no control over the code for the game window.
> But, as PaulN said, you can get a handle to the game window and then
> use InvalidateRect. I have, in desperation, sometimes hidden and then
> reshown a window to force it to repaint.
>

I hadn't tried InvalidateRect, but I did try hiding and showing the
entire window, and that didn't work. But I solved my issue, I send a
PostMessage of WM_NCLBUTTONDOWN to the border, which caused the window
to resize itself.
From: r_z_aret on
On Fri, 12 Mar 2010 20:37:43 -0800 (PST), mikew <mikew3456(a)gmail.com>
wrote:

>
>> I infer that you have no control over the code for the game window.
>> But, as PaulN said, you can get a handle to the game window and then
>> use InvalidateRect. I have, in desperation, sometimes hidden and then
>> reshown a window to force it to repaint.
>>
>
>I hadn't tried InvalidateRect, but I did try hiding and showing the
>entire window, and that didn't work. But I solved my issue, I send a
>PostMessage of WM_NCLBUTTONDOWN to the border, which caused the window
>to resize itself.

InvalidateRect is the "official" method to get a window to repaint, so
I suggest trying it before you settle on your solution. But I'm glad
you have something that works.
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 400
Boston, MA 02116
www.penfact.com
Useful reading (be sure to read its disclaimer first):
http://catb.org/~esr/faqs/smart-questions.html
From: mikew on

>
> InvalidateRect is the "official" method to get a window to repaint, so
> I suggest trying it before you settle on your solution. But I'm glad
> you have something that works.


InvalideRect didnt work. Neither did InvalidateRgn. These windows need
to rescale themselves or something and it only occurs when you resize
the window.

And, my WM_NCLBUTTONDOWN solution doesn't work on Vista/Win7 with Aero
enabled. Users are reporting that the window is getting resized to the
minimum or something stupid. So it seems the message is getting sent
properly but something else is happening.. I'm on XP and it works for
me =(