The _WinAPI_TextOut() function requires a x/y point. In a rectangle enclosing a text character, where is the x/y point, upper left or lower left? I'm trying to setup a function to print a header, then normal text lines, and I want the header to be at the top of the printable area on a page.. I use _WinAPI_GetDeviceCaps() to get the start of the printable area. Then at the start of each page, I want to print a header, then text lines.
$iLeftMargin_X = _WinAPI_GetDeviceCaps($hDC, $PHYSICALOFFSETX) ; returns 151
$iTopMargin_Y = _WinAPI_GetDeviceCaps($hDC, $PHYSICALOFFSETY) ; returns 70
; print the header:
$x = $iLeftMargin_X
$y = $iTopMargin_Y
WinAPI_TextOut($hDC, $x , $y, "header text")
; print the first text line
$y += 22
WinAPI_TextOut($hDC, $x , $y, "The first text line")
Will the header text be at the physical top of the printable area or will it be 1 text line lower. It all depends on whether $iTopMargin_Y refers to the top of the text or the bottom of the text.