The routine in question is going through a linked list of windows and
redrawing the exposed portion of each. The routine starts by doing an error
check (only on debug ROMs). This check is what's being hit. It goes through
all the windows in the chain, and checks each one for validity. The first
one (top most) is skipped. The rest are checked to make sure they are in
fact forms rather than windows used for other things like popup lists and
menus. Then they're checked to see if they're visible, and if so, their
dimensions are checked. The "Form must be full width" message is generated
if the left side is greater than 0 or the width is less than the width of
the screen. The bounds are computed using WinGetWindowFrameRect. This API
takes the bounds of the window and extends them to include the frame around
it.

Conclusion: Some other form in the stack is the problem. Make sure every
form/dialog is full width, taking their border into account (2, 156 for
dialogs, 0, 160 for forms). Popup lists and other such things should be
removed so that no dialog ever opens on top of them.

For debugging purposes only:

You should be able to write your own loop to iterate through the windows and
see which one is the problem. Start with WinGetFirstWindow, then use
WinGetWindowPointer, and follow the nextWindow reference to the next
WinHandle in the chain. Stop when you reach a null pointer. If you can
assume all the windows are visible, then you can just use
WinGetWindowFrameRect to get the bounds and check them against the screen
bounds returned by WinGetDisplayExtent. If at all possible, sign the
agreement and get your hands on the source code so you can do this more
easily!
-- 
Peter Epstein

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to