Hello Ben,

Wednesday, May 29, 2002, 5:56:07 AM, you wrote:

BC> Hi,

BC> Does anyone know the relationship between the
BC> specified Height and Width in Mapbasic Dialog boxes
BC> and those of VB Dialog Boxes?

BC> E.g: 4 width unit in MB = one char
BC>     therefore how many width units in VB = 4 Width
BC> units in MB??

BC> Thanx
BC> Ben
>From MapBasic Help:

Sizes and Positions of Dialogs and Dialog Controls
---------------------------------------------------
Within the Dialog statement, sizes and positions are stated in terms of dialog units.
A width of four dialog units equals the width of one character, and a height of eight
dialog units equals the height of one character.

Thus, if a dialog control has a height of 40 and a width of 40, that control is roughly
ten characters wide and 5 characters tall.

>From MSDN:
----------
GetDialogBaseUnits function

The GetDialogBaseUnits function retrieves the system's dialog base units, which are the
average width and height of characters in the system font. For dialog boxes that use 
the
system font, you can use these values to convert between dialog template units, as 
specified
in dialog box templates, and pixels. For dialog boxes that do not use the system font, 
the
conversion from dialog template units to pixels depends on the font used by the dialog 
box. 
For either type of dialog box, it is easier to use the MapDialogRect function to 
perform
the conversion.
MapDialogRect takes the font into account and correctly converts a rectangle from 
dialog
template units into pixels.

LONG GetDialogBaseUnits(VOID);




-- 
Best regards,
Vladimir Lashin
microOLAP Technologies LLC

MBBuilder - Visual Development Tool for MapBasic - http://www.microolap.com/gis/mb.htm
Raster Handler for ERDAS Imagine to MapInfo - http://www.microolap.com/gis/imgrhl.htm
MapInfo Callbacks Manager ActiveX - http://www.microolap.com/gis/micm.htm

mailto:[EMAIL PROTECTED]
http://www.microolap.com/gis/ - GIS related products



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to