Listers,

I have a MapBasic application that presents the user with a dialog when a
custom toolbutton is used.  I want the user to be able to move this dialog
before it is dismissed and have the dialog posted to that new position the
next time the toolbutton is used.  I don't think there is a way to do this
with MapBasic alone because although the 'Dialog' statement has the
'position' parameter to position the dialog when its posted, there's no way
of querying the current position once the user has moved it.  If I'm wrong
on this, please let me know!

I thought of using the 'GetWindowPlacement' and 'SetWindowPlacement' API
functions to get around this MB shortcoming but these functions both require
the Windows Hwnd of the dialog box and I cannot find a way to get it.  I've
tried using the 'FindWindow' API function, passing the caption of my dialog
as the second argument (and "" for the first), but it just returns zero to
me.  I've also tried using the 'GetTopWindow' API function like this -
'GetTopWindow(WindowInfo(WIN_MAPINFO, WIN_INFO_WND))' but that returns the
Hwnd of the top document window (a map window in my case) rather than the
dialog.  I tried both of these from handlers invoked when the dialog command
buttons are used - so the dialog is still present and (I had hoped) is the
'top' window with the focus.  Can anyone suggest how I might use either of
these functions successfully, or suggest an alternative method?

Thanks for any help you can provide.

Richard Burkmar
ICL
[EMAIL PROTECTED]

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to