View Issue Details

IDProjectCategoryView StatusLast Update
0017503FPCRTLpublic2010-11-24 16:57
ReporterJörgen Hägglund Assigned ToJonas Maebe  
Status resolvedResolutionno change required 
Product Version2.5.1 
Summary0017503: video.ScreenHeight invalid
DescriptionUsing video.ScreenHeight gives the incorrect value.
On a 80x25 console, ScreenHeight gives 80.
Using CursorLines gives the correct value, but I don't see why ScreenHeight should give anything other than 25 (in this case).
Steps To ReproduceProgram Test;
Uses video;
  WriteLn('Width: ', ScreenWidth, 0000013#10, 'Height: ', ScreenHeight);
TagsNo tags attached.
Fixed in Revision
Attached Files


Jonas Maebe

2010-11-24 16:57

manager   ~0043485

There's this comment in SysInitVideo for Windows platforms:

    About the ConsoleCursorInfo record: There are 3 possible
    structures in it that can be regarded as the 'screen':
    - dwsize : contains the cols & row in current screen buffer.
    - srwindow : Coordinates (relative to buffer) of upper left
                 & lower right corners of visible console.
    - dmMaximumWindowSize : Maximal size of Screen buffer.
    The first implementation of video used srWindow. After some
    bug-reports, this was switched to dwMaximumWindowSize.
  with ConsoleInfo.dwMaximumWindowSize do

I don't know which bug reports this is about, and the change predates svn revision 1. But there is apparently a reason for not returning the same result as for cursorlines.

Issue History

Date Modified Username Field Change
2010-09-28 19:15 Jörgen Hägglund New Issue
2010-11-24 16:57 Jonas Maebe Status new => resolved
2010-11-24 16:57 Jonas Maebe Resolution open => no change required
2010-11-24 16:57 Jonas Maebe Assigned To => Jonas Maebe
2010-11-24 16:57 Jonas Maebe Note Added: 0043485