Mike,
If you have a look at the MapBasic help file you'll see that the
CommandInfo(CMD_INFO_WIN) only are used within the WinChangedHandler or
WinClosedHandler. This means that you'll have to insert your code into the
WinClosedHandler to make it work properly.
The reason why you get a value that equals the value of
CommandInfo(CMD_INFO_X) is that these two constants have the same value in
the MapBasic.def:
Define CMD_INFO_X 1
Define CMD_INFO_Y 2
Define CMD_INFO_WIN 1
HTH,
Peter Horsboll Moller
GIS Developer
COWI A/S
Rugardsvej 55
DK 5000 Odense C
Tel +45 6313 5013
Direct +45 6313 5008
Mobil +45 2270 4308
Fax +45 6313 5090
-----Original Message-----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 21-01-03 23:29
Subject: MI-L CommandInfo(CMD_INFO_WIN) Returning X, not ID
The code below in MIPro 7 is intended to unselect the selection when the
user
closes certain browser windows, according to the browser window's name.
But the CommandInfo( CMD_INFO_WIN ) returns numbers like -121.434 or
-97.0102, which are the X of the point in the map window the user picked
for
the radius select tool that created the browser's selection. Shouldn't
it
return the browser window id integer? CommandInfo( CMD_INFO_WIN_X )
returns
the map's X like it should.
Mike
'''''''''''''''''''''''''''''''''''''''
Sub WinClosedHandler
Dim iWinID
iWinID = CommandInfo( CMD_INFO_WIN )
If Left$(WindowInfo(WIN_INFO_NAME, WindowID(iWinID0), 21) = "Points
within Radius "
Run Menu Command M_QUERY_UNSELECT
Run Menu Command M_WINDOW_REDRAW
End If
End Sub
'''''''''''''''''''''''''''''''''''''''''''
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5059
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5069