-
Mailing-Liste
Inhalt
MapInfo-Fenster anordnen
07.04.2000
 

Unter Win 32/NT kann folgender MapBasic-Code verwendet werden, um Fenster innerhalb von MapInfo Professional anzuordnen:

Type TRect
  Left As Integer
  Top As Integer
  Right As Integer
  Bottom As Integer
End Type

Declare Function GetClientRect Lib "user32"
(ByVal hWnd As Integer, rc As TRect) As Integer

Dim hMiMdi As Integer, rct As TRect
hMiMdi = FindMDIClient(WindowInfo(WIN_MAPINFO, WIN_INFO_WND))
If hMiMdi <> 0 Then
  Call GetClientRect(hMiMdi, rct)
End If
' Now, you have size of MapInfo MDI client in rct variable.
' Its Left and Top fields
' are 0, which is normal for GetClientRect function result.
' rct.Right and rct.Bottom
' contain width and height of this window, in pixels.
' To adjust size and position of another MapInfo windows
' within this window (document
' windows such as maps and browsers are children of
' hMiMdi window), use this (iNumID
' is a numeric window identifier, for example,
' got by FrontWindow() or WindowID(0)):

Declare Function MoveWindow Lib "user" (ByVal hWnd,
ByVal x, ByVal y, ByVal cx, ByVal cy,
ByVal repaint As Integer) As Integer

Dim iLeft, iTop, iWidth, iHeight, r, iWnd As Integer

iWnd = WindowInfo(iNumID, WIN_INFO_WND)
iLeft = 0
iTop = 0
iWidth = rct.Right/2
iHeight = rct.Bottom
r = MoveWindow(iWnd, iLeft, iTop, iWidth, iHeight, 1)
' This makes MapInfo window iNumID to fill left half
' of MapInfo MDI client.


Dazu Literaturtips bei unserem Partner, amazon.de:
INSIDE MapInfo Professional 6.0 - Neuerscheinung 2001!
Minding your Business with MapInfo
MapBasic Developer's Guide - derzeit evt. vergriffen
Quelle: Dmitry A. Bogdanov, Ki

 

Neuigkeiten und Anregungen senden Sie bitte an gis-news.de!

Literatur
Buch des Monats:

Geoinformation im Internet

GeoIT-Shop

Suche

www.strato.de -> hier klicken
RSS FULL