none
what does this code mean? RRS feed

  • Question

  • What does the following code mean ? 

    TextOut (hdc, 24 * cxChar, cyChar * (rect.bottom / cyChar − 1),

    Thanks. 

    Tuesday, July 5, 2016 11:18 AM

Answers

  • Hi Thomas Hopes,

    thanks for posting here.

    The TextOut function is used to write a character string at the specified location. The second and the third parameter are the x-coordinate and y-coordinate as the reference points that the system uses to align the string.

    And the * here is not a pointer. It's as Rudolf Meier said a multiplication operation.

    Best Regards,

    Sera Yu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Wednesday, July 6, 2016 1:36 AM

All replies

  • That's the call of the functon "TextOut" with parameter hdc for the HDC, nXStart is a number and nYStart is an other number... the Y-calculation returns (rect.bottom - cyChar)

    Rudolf

    • Proposed as answer by Eddie Lotter Tuesday, July 5, 2016 4:27 PM
    Tuesday, July 5, 2016 11:48 AM
  • That's the call of the functon "TextOut" with parameter hdc for the HDC, nXStart is a number and nYStart is an other number... the Y-calculation returns (rect.bottom - cyChar)

    Rudolf

    And what those '*' mean ? Is this Pointer or  (2*2 ) Calculation or what ? 
    Tuesday, July 5, 2016 11:57 AM
  • * is the sign for multiplication
    Tuesday, July 5, 2016 12:15 PM
  • Hi Thomas Hopes,

    thanks for posting here.

    The TextOut function is used to write a character string at the specified location. The second and the third parameter are the x-coordinate and y-coordinate as the reference points that the system uses to align the string.

    And the * here is not a pointer. It's as Rudolf Meier said a multiplication operation.

    Best Regards,

    Sera Yu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Wednesday, July 6, 2016 1:36 AM