Announcement

Collapse
No announcement yet.

Logical Units...Points???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logical Units...Points???

    Hi every ones,

    I am making some Windows effect with CreateEllipticRgn, CreatePolygonRgn... with PBDLL 5.0

    When I found that those functions worked with logical units I understood why it wax not aligned well...

    I read a lot of docuemnts about graphic mesurments in Windows but now I am very mixed...

    I see there is Logical Units, logical points (is it the same??), pixels, twips, dialogue units, and soo on...

    Is there any math calculation or any API functions to convert logical unit to pixel?

    Thanks in advance...


    -------------
    -------------------------------------------
    Francis Beaulieu
    FrabLaser Softwares
    Francis Beaulieu
    Prog senior of 17 years.
    Microsoft Specialist

  • #2
    Code:
    Logical Units = Logical Points
    Pixels        = Device Points
    Normally, Logical Points and Pixels are the _same_ unless you are using a non-default mapping mode (the default mode is %MM_TEXT). However, you can always use the DPtoLP() and LPtoDP() API's to translate between, as these functions take in account the current mapping mode.

    If you are using DDT, then DDT uses Dialog Units for all statements & measurements of dialogs and controls. To translate Dialog Units to Device Points use the DIALOG UNITS...TO PIXELS and DIALOG PIXELS...TO UNITS statements built into PB/DLL 6.0.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Ok Lance!

      That what I was searching for...!!

      Is Power Basic pay you to work the weekend also?

      And your wife, is she like a work-addict like you?

      But if she dont, for us, we like a work-addict like you!

      Thanks

      ------------------
      -------------------------------------------
      Francis Beaulieu
      FrabLaser Softwares

      [This message has been edited by Francis Beaulieu (edited March 04, 2000).]
      Francis Beaulieu
      Prog senior of 17 years.
      Microsoft Specialist

      Comment

      Working...
      X