Massimo,

The bug is not related to Cytrix or Terminal server.
Just try to execute the following PRG code directly under Windows console:

SetMode(25,80)
? "Initial console size:", maxrow()+1,"X", maxcol()+1
? "Changing to         :", maxrow()+1+1, "X", maxcol()+1-1
wait
SetMode(maxrow()+2,maxcol())
? "Size after SetMode():", maxrow()+1,"X", maxcol()+1
wait


The expected output is:

Initial console size:         25 X         80
Changing to         :         26 X         79
Press any key to continue...
Size after SetMode():    26 X         79
Press any key to continue...

Because of the bug in SetMode, the second SetMode (SetMode(maxrow()+2,maxcol()) does not execute correctly and console dimentions do not change. The actuall (buggy) output is:

Initial console size:         25 X         80
Changing to         :         26 X         79
Press any key to continue...
Size after SetMode():    25 X         80
Press any key to continue...

Regards,
Jacek
Can you post a little sample to show the problem so i can try on
Terminal server & Citrix?

2009/12/22 Jacek Potempa <jacek.pote...@otc.com.pl>:
Hi,

(sorry for my previous post under invalid subject - please ignore)

Recently one of our customers reported bug in Terminal software. After
tracing it down it seems that the actuall problem lays in xHarbour/Harbour
implementation of the  hb_gt_win_SetMode() / gtwin.c

SetConsoleWindow API function cannot set console window larger then current
screen buffer
SetConsoleScreenBufferSize API function cannot set screen buffer smaller
than the current console window size

Due to this limitations, in current implementation SetMode() is unable to change console size if one ot the new dimentions is larger then the previous one and at the same time the other one is smaller then the previous one. For
instance, having console 25 X 80, SetMode( 23, 85 ) will fail.

Below my suggested fix for this problem. I have no access to CVS, so would be nice if somebody familiar with gtwin.c review and implement the solution.

Regards,
Jacek



_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to