这个问题用REGIONS的API函数来实现,先把各个州分成不同的REGION,然后用PtInRegion函数求得一个点所在的REGION

解决方案 »

  1.   

    你查一下Region相关的API
    以下是函数表:
    Function Description 
    CombineRgn Combines two regions and stores the result in a third region. 
    CreateEllipticRgn Creates an elliptical region. 
    CreateEllipticRgnIndirect Creates an elliptical region. 
    CreatePolygonRgn Creates a polygonal region. 
    CreatePolyPolygonRgn Creates a region consisting of a series of polygons. 
    CreateRectRgn Creates a rectangular region. 
    CreateRectRgnIndirect Creates a rectangular region. 
    CreateRoundRectRgn Creates a rectangular region with rounded corners. 
    EqualRgn Checks the two specified regions to determine whether they are identical. 
    ExtCreateRegion Creates a region from the specified region and transformation data. 
    FillRgn Fills a region by using the specified brush. 
    FrameRgn Draws a border around the specified region by using the specified brush. 
    GetPolyFillMode Retrieves the current polygon fill mode. 
    GetRegionData Fills the specified buffer with data describing a region. 
    GetRgnBox Retrieves the bounding rectangle of the specified region. 
    InvertRgn Inverts the colors in the specified region. 
    OffsetRgn Moves a region by the specified offsets. 
    PaintRgn Paints the specified region by using the brush currently selected into the device context. 
    PtInRegion Determines whether the specified point is inside the specified region. 
    RectInRegion Determines whether any part of the specified rectangle is within the boundaries of a region. 
    SetPolyFillMode Sets the polygon fill mode for functions that fill polygons. 
    SetRectRgn Converts a region into a rectangular region with the specified coordinates. 在地图上创建不规则的Region并保存到一个文件中然后判断Cusor是否在此Region即可
      

  2.   

    对了
    这儿为何不见那个第一高手
    dbcontrols?????????