determining child window positions

I am trying to debug a win32 windows-mobile app that I am largely unfamiliar with.

I am forcing a periodic InvalidateRect(hWnd,NULL,FALSE) and each time I do the WM_PAINT method is being called, but the GetUpdateRect() returns 0,0,0,0, and obviously nothing that is drawn is visible. GetWindowRect() and GetClientRect() show the window is there and is not zero sized.

I am guessing that the window is completely obscured by its children. Its a maze trying to find these children in the code, however.

How should I approach debugging this? E.g. can I list these children and their positions?


I imagine you're aware of this already, but just in case, if your call to GetUpdateRect is following a call to BeginPaint while processing WM_PAINT then receiving an empty rect is the expected behavior. See the remarks in the docs for GetUpdateRec:

The update rectangle retrieved by the BeginPaint function is identical to that retrieved by GetUpdateRect.

BeginPaint automatically validates the update region, so any call to GetUpdateRect made immediately after the call to BeginPaint retrieves an empty update region.

You can enumerate child windows with EnumChildWindows.

I'd start with Remote Spy++ to see what's going on. You could also call FindWindowEx to look at siblings, etc.

Need Your Help

Web API Controller won't work with POST/PUT/DELETE in ASP.NET Web Forms

c# rest jquery webforms

Hi I am having trouble trying to POST/PUT/DELETE objects with the Web API Controller from Ajax. My Hello object is getting Post/Put as id = 0, hello = null no matter what I try.

Clicking group of links in watir

ruby watir watir-webdriver

I am new to ruby, and I am trying to work with watir. I think I got the basics, but I am having trouble clicking all links whose id matches a regex. I tried this;