Hello MI-L -

        The solution to my problem turned out to be a quickie, so I
thought I would post a little summary here.  My thanks to all who
responded, but as it turned out I was overthinking my current problem.
Jerry Howard's answer got me going in the right direction - the result
was this little function that returns the current MapInfo window width
in inches.  That function was used to place legends and map windows
where I wanted and produced an attractive result at a variety of screen
resolutions wether or not MapInfo was running fullscreen.


Include "MapBasic.def"

Declare Function MapWinWidth() As Float


Function MapWinWidth() As Float
  Dim nMapInfoWidth As Float
  nMapInfoWidth = WindowInfo(WIN_MAPINFO, WIN_INFO_WIDTH)
  'Print Chr$(12)
  'Print "MapInfo Width = " & nMapInfoWidth & " Inches."
  MapWinWidth = nMapInfoWidth
End Function  

. 
.
.
  Dim LegPosX, LegWidth As Float
  LegPosX = MapWinWidth() * 0.75 
  LegWidth = (MapWinWidth() - LegPosX) - 0.2


  Create Cartographic Legend
  Position (LegPosX,0) Units "in"
  Width LegWidth Units "in" Height 4.0 Units "in" 
  Window Title "Venue Legend"
  Portrait
  Frame From Layer 1
    Border Pen (1,1,0)
.
.

  Set Window nMapWinID Width MapWinWidth() * 0.75 
  Set Window nMapWinID Front
  Set Map Redraw On


The above code is partial but in this example creates a map which
occupies 75% of the MapInfo Window and a legend that fits itself into
the remaining 25%.


Thank's also to David Haycraft for the API solution, which may come in
handy at a later time.





_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to