[Migrated content. Thread originally posted on 26 October 2005]
Is it right to use W$TEXTSIZE for examine the height/width of a font for printing? Because before skipping to an next page I have to print some subtotals etc.Page 1 / 1
[Migrated content. Thread originally posted on 26 October 2005]
Is it right to use W$TEXTSIZE for examine the height/width of a font for printing? Because before skipping to an next page I have to print some subtotals etc.[Migrated content. Thread originally posted on 26 October 2005]
Is it right to use W$TEXTSIZE for examine the height/width of a font for printing? Because before skipping to an next page I have to print some subtotals etc.[Migrated content. Thread originally posted on 26 October 2005]
Is it right to use W$TEXTSIZE for examine the height/width of a font for printing? Because before skipping to an next page I have to print some subtotals etc.[Migrated content. Thread originally posted on 26 October 2005]
Is it right to use W$TEXTSIZE for examine the height/width of a font for printing? Because before skipping to an next page I have to print some subtotals etc.As for printing, not being able to provide the handle will give unpredictable results.
What you could do, is to use the WINPRINT-SET-CURSOR before printing to obtain current position, then print a line, use WINPRINT-SET-CURSOR again and subtract the difference, then you know the line feed.
Read the docs on WINPRINT-SET-CURSOR for info on how to get current position.
[Migrated content. Thread originally posted on 26 October 2005]
Is it right to use W$TEXTSIZE for examine the height/width of a font for printing? Because before skipping to an next page I have to print some subtotals etc.First I will use WINPRINT-SET-FONT with WIN$PRINTER before to print a line(so the system nows the current font), after that I will CALL GetCharWidthFloat. Is that the solution, to use GetCharWidthFloat? :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_9ltg.asp
With this function I can use H-ACU-SPOOLER-DC? If it can, how is the rest of the parameters in the cobol-syntax? When it can not, what I have to do then? I will examine the character "0" and count de values A,B en C.
[Migrated content. Thread originally posted on 26 October 2005]
Is it right to use W$TEXTSIZE for examine the height/width of a font for printing? Because before skipping to an next page I have to print some subtotals etc.E.g.:
OPEN OUTPUT myprinter
| set the font
CALL "GetTextExtentPoint32A" USING ...
The size structure in COBOL:
01 MY-SIZE.
03 cx PICTURE X(4) COMP-N.
03 cy PICTURE X(4) COMP-N.
Note however that depending on the host OS cy is the height of the string, not the line. If needed, you may get this intercharacter spacing by calling GetTextCharacterExtra.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.