Announcement

Collapse
No announcement yet.

GetTextExtentPoint32

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

  • DienyduToit
    Guest replied
    Thank you, Semen and Edwin -- that works!


    ------------------

    Leave a comment:


  • Edwin Knoppert
    replied
    +++
    And you don't need to specify the Chr$( 0 )
    PB does that for you..

    Don't do: Text$ & Chr$( 0 )

    ------------------
    [email protected]

    Leave a comment:


  • Semen Matusovski
    replied
    Dieny --
    the second parameter should be Asciiz.
    I guess that tx$ is declared as string.
    If so, you should use ByCopy tx$ or ByVal StrPtr(tx$)

    When you use a$ + b$, compiler converts according declaration automatic. That's why tx$ + CHR$(0) is accepted.



    ------------------

    Leave a comment:


  • DienyduToit
    Guest started a topic GetTextExtentPoint32

    GetTextExtentPoint32

    The Windows API HELP states, in connection with GetTextExtentPoint32,
    that --

    lpString

    Points to the string of text. The string does not need to be zero-terminated, since cbString specifies the length of the string.

    This line of code works:

    Call GetTextExtentPoint32 (hDC&, tx$+Chr$(0), Len(tx$), apiSz)

    If the Chr$(0) is removed, PowerBasic reports a compile time error
    about "parameter mismatch". Anyone know of a reason for this?


    ------------------
Working...
X
😀
🥰
🤢
😎
😡
👍
👎