Click to See Complete Forum and Search --> : Import form to VC++


zakro
May 19th, 1999, 12:21 AM
Which algorithm of converting twips to dialog units is used when we import form created in VBasic to the Visual C++

Lothar Haensler
May 19th, 1999, 02:28 AM
VB has a TwipsPerPixelX and TwipsPerPixelY to convert from Twips to Pixel.
Check out the online docs for the GetDialogBaseUnits API to convert to dialog units.

zakro
May 19th, 1999, 02:50 AM
Thanks,but the problem is that probably VC++ uses different conversion method than described in the documentation.
When I create form in VB of W=3000 twips and H=3000 twips it is square and after importing to VC++ it is still square and has W=128 dlg units and H=106 dlg units.
But when I try to covert manually twips by using Screen.TwipsPerPixel, GetDialogBaseUnits and formula like W(in dlgunits) = pixels*4/basedlgunitsforwidth I got different results from VC++. Where is the problem?