I notice a little difference between PBWin 8.03 and 8.04.
In the following program compiled with 8.04 when a string is printed char by char in a graphic using a fixed font (Courier)
the final result is not the same as when printing the whole string at the same time.
In the first case every char overwrite a small part of the previous one.
This didn't happen in PBWin 8.03.
Any idea about cause/workaround ?
Thanks
In the true program the string is an input field written char by char when the user input chars from keyboard.
I workaround the problem rewriting the complete field after every keystroke,
but this kind of problems leave me in doubt ... how many small, but annoying differences will I find ?
In the following program compiled with 8.04 when a string is printed char by char in a graphic using a fixed font (Courier)
the final result is not the same as when printing the whole string at the same time.
Code:
#include "win32api.inc" Function PBMain() as long[INDENT]dialog new pixels,0,"Test",,,1000,500,%ws_caption or %ws_minimizebox or %ws_maximizebox or %ws_sysmenu,0 to hdlg&[/INDENT] [INDENT]control add graphic,hdlg&,1001,"",0,0,980,450,%ws_border or %ws_clipsiblings,%ws_ex_clientedge[/INDENT] [INDENT]graphic attach hdlg&,1001,redraw[/INDENT] [INDENT]graphic font "Courier New",15,1[/INDENT] [INDENT]x!=0![/INDENT] [INDENT]c$="MAMMA PROVA QUADRO" ' any string to print[/INDENT] [INDENT]for c%=1 to len(c$)[/INDENT] [INDENT] graphic set pos (x!,100!)[/INDENT] [INDENT] graphic print mid$(c$,c%,1); ' print string char by char[/INDENT] [INDENT] graphic redraw[/INDENT] [INDENT] x!=x!+12! ' 12 is the size in pixel of any character in the selected fixed font[/INDENT] [INDENT]next[/INDENT] [INDENT]graphic set pos (0!,120!)[/INDENT] [INDENT]graphic print c$; ' print whole string[/INDENT] [INDENT]graphic redraw[/INDENT] [INDENT]dialog show modal hdlg&[/INDENT] [INDENT]control kill hdlg&,1001[/INDENT] [INDENT]dialog end hdlg&[/INDENT] End Function
This didn't happen in PBWin 8.03.
Any idea about cause/workaround ?
Thanks
In the true program the string is an input field written char by char when the user input chars from keyboard.
I workaround the problem rewriting the complete field after every keystroke,
but this kind of problems leave me in doubt ... how many small, but annoying differences will I find ?
Comment