Mappoint 2002

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Billy Jacobs

    #1

    Mappoint 2002

    I am attempting to draw on a Mappoint 2002 active X
    control using GDI by the following method:

    1. I create a graphics object:
    g = graphics.FromHw nd(axMap.handle )
    2. I draw a rectangle on it.
    g.FillRectangle (new solidBrush(Colo r.Navy), 0,0,
    AxMap.width, AxMap.height)

    The result is that I can see a blue outline around the map
    as if it is drawing it behind the map.

    Where can I find documentation on how to draw on the map
    at specified lat and lon?

    Thanks

    Billy Jacobs
  • John Eikanger [MSFT]

    #2
    RE: Mappoint 2002

    Hi, Billy

    What you are trying to do with mappoint control is not supported. I can
    offer some things to try, based on some poking around I did. I believe you
    are painting on the wrong hwnd. The one you want is one of the children's
    children's children etc of the one where you are actually painting. You
    can use the spy++ tool to do some detective work, and determine the hwnd of
    the actual drawing surface. Once you know the class you should be able to
    call FindWindow to get the hwnd of the drawing surface. You could also
    enumerate the parents until you get to the hwnd you get from dotnet. You
    could then write code using GetWindow to wend your way through the various
    children to the drawing surface. I think you would be better off using
    the built in functionality if you possibly can.

    I hope you found this information useful, and thank you for choosing the
    MSDN Managed Newsgroups,

    John Eikanger
    Microsoft Developer Support

    This posting is provided “AS IS” with no warranties, and confers no rights.
    (c) 2003 Microsoft Corporation. All rights reserved.
    --------------------
    | Content-Class: urn:content-classes:message
    | From: "Billy Jacobs" <billnospam@csa .com>
    | Sender: "Billy Jacobs" <billnospam@csa .com>
    | Subject: Mappoint 2002
    | Date: Mon, 4 Aug 2003 15:03:21 -0700
    | Lines: 18
    | Message-ID: <036e01c35ad4$3 80600f0$a501280 a@phx.gbl>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="iso-8859-1"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | Thread-Index: AcNa1DgGB4XGUVe PRoSChXVyrdmG5A ==
    | Newsgroups: microsoft.publi c.dotnet.genera l
    | Path: cpmsftngxa06.ph x.gbl
    | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:103438
    | NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
    | X-Tomcat-NG: microsoft.publi c.dotnet.genera l
    |
    | I am attempting to draw on a Mappoint 2002 active X
    | control using GDI by the following method:
    |
    | 1. I create a graphics object:
    | g = graphics.FromHw nd(axMap.handle )
    | 2. I draw a rectangle on it.
    | g.FillRectangle (new solidBrush(Colo r.Navy), 0,0,
    | AxMap.width, AxMap.height)
    |
    | The result is that I can see a blue outline around the map
    | as if it is drawing it behind the map.
    |
    | Where can I find documentation on how to draw on the map
    | at specified lat and lon?
    |
    | Thanks
    |
    | Billy Jacobs
    |

    Comment

    Working...