CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    7

    Import form to VC++

    Which algorithm of converting twips to dialog units is used when we import form created in VBasic to the Visual C++


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Import form to VC++

    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.


  3. #3
    Join Date
    Apr 1999
    Posts
    7

    Re: Import form to VC++

    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?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured