What you need to do is use the values returned by
CommandInfo(CMD_INFO_X) and CommandInfo(CMD_INFO_Y).
The values will be the Longitude and Latitude of where the user clicked
the tool.
Add this code to the handler routine to create point objects in the
cosmetic layer of a map:
Insert Into WINDOWINFO(FrontWindow(),10) (obj) Values(CreatePoint(
CommandInfo(CMD_INFO_X) , CommandInfo(CMD_INFO_Y)))
--------------------------------------------------------------------
Ken Fioretti - [mailto:[EMAIL PROTECTED]]
CBA Industries, Inc - (201) 587-1717
--------------------------------------------------------------------
> ----------
> From: Denise Rae Bleakly[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Monday, January 18, 1999 5:56 PM
> To: [EMAIL PROTECTED]
> Subject: MI Help Creating Point Ojects
>
> Good Day MapInfo-L:
>
> As a very newbe in MapBasic programming, I am having a hard time
> making
> a new button work.
>
> I am trying to create a new button on a tool that represents a symbol
> that I want to place on the map.
>
> I've created the button, but the creation of a new point object using
> the CommandInfo(CMD_INFO_X), CommandInfo(CMD_INFO_Y) and Create Point
> commands has me baffled.
>
> The new tool bar comes up with the button, but when I run the code, I
> get an active button, but when I press the button I get a system error
> : Internal Error 30901, and mapinfo closes.
>
> Any suggestions as to what I need to do differently?
>
>
> Denise Bleakly
> Sandia National Laboratories
> [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]
>
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]