1

I am monitoring DirectX application that is in windowed mode on Vista. GetClientRect reports correct size until application is minimized and restored then it always returns the preview size (106x160).

Is there any other way to query window for client area than use GetClientRect WinAPI? Perhaps sending message to the window, or checking what Windows knows about window client area?

Any help would be appreciated and if you can use C# or .NET it would be a bonus but any other language would do

Max OfLondon
  • 104
  • 9

1 Answers1

1

I think you should not call GetClientRect when the application is minimized because it does not make much sense, there is not client area visible at all when minimized.

look here: How could I detect when my application is minimized? there is of course a way to detect when a window is minimized so you can avoid using GetClientRect in that case.

Community
  • 1
  • 1
Davide Piras
  • 43,984
  • 10
  • 98
  • 147
  • I call GetClientRect after the application was restored so this does not really help much. What I noticed is that after calling GetClientRect for 3 minutes the dimensions finally are set correctly which is quite strange but that's why I want to know if there are other ways I can get client rect. – Max OfLondon Aug 28 '11 at 13:36