Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

The Doszip Commander version 2.50 available (Announce)

posted by nidud E-mail, Norway, 02.10.2013, 09:44

>
> The few full-screen console Win32 applications that I wrote don't care
> about pixels or fonts - and they work fine when launched by "full-sized"
> FM.

Well, FM is setting the "full-sized" window then

> All they use is the CONSOLE_SCREEN_BUFFER_INFO.dwMaximumWindowSize
> member.

That is the same as .dwSize:
main      proc c
local   ci:CONSOLE_SCREEN_BUFFER_INFO
        .if GetConsoleScreenBufferInfo(hStdOutput,addr ci)
            mov eax,ci.dwSize
            movzx ecx,ax
            shr eax,16
            dec eax
            invoke printf,"COLS:\t%d\nROWS:\t%d\n",ecx,eax
            mov eax,ci.dwMaximumWindowSize
            movzx ecx,ax
            shr eax,16
            dec eax
            invoke printf,"MaximumWindowSize:\n COLS:\t%d\n ROWS:\t%d\n",ecx,eax
            invoke getch
        .endif
        sub eax,eax
        ret
main    endp


Executed from Windows:
COLS:   80
ROWS:   24
MaximumWindowSize:
 COLS:  80
 ROWS:  24


Executed from Doszip in a large-size window:
COLS:   140
ROWS:   48
MaximumWindowSize:
 COLS:  140
 ROWS:  48


The GetLargestConsoleWindowSize function returns the size of the largest possible console window,
based on the current font and the size of the display.
COORD GetLargestConsoleWindowSize(
  HANDLE hConsoleOutput   // handle to console screen buffer
);


The SetConsoleWindowInfo function sets the current size and position of a console screen buffer's window.
BOOL SetConsoleWindowInfo(
  HANDLE hConsoleOutput,  // handle to console screen buffer
  BOOL bAbsolute,         // coordinate type flag
  CONST SMALL_RECT *lpConsoleWindow
                          // address of new window rectangle
);


I will do some testing...

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 396 users online (0 registered, 396 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum