🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
3 messages
3 total messages Started by Colin Goldstein Thu, 10 Jan 1991 00:51
Using VioSetMode
#2364
Author: Colin Goldstein
Date: Thu, 10 Jan 1991 00:51
43 lines
2130 bytes
I have a question about using VioSetMode. I find that it only works
some times. If I have the display in 80*50 mode and use VioSetMode
to change it to 80*25, it works. However, if I'm in other modes such
as 80*34 it does not work at all. And if I'm in 80*12 or 80*43, it
only partially works. Although the screen changes to the correct 
number of lines, the font is not the default font.

I have enclosed the code I'm using to test this. Any help would be
appreciated.

Colin
------------ CODE ------------------ CODE --------------------------
#define INCL_BASE
#define INCL_NOPM
#include <os2.h>

main()
{
   VIOMODEINFO viomi;
   BYTE bCell[2];

   bCell[0] = 0x20;      /* space character       */
   bCell[1] = 0x07;      /* white attribute (EGA) */

//   VioScrollDn(0, 0, 0xFFFF, 0xFFFF, 0xFFFF, bCell, 0);
//   VioSetCurPos(0, 0, 0);

   viomi.cb = sizeof(viomi);
   VioGetMode(&viomi, 0);

   viomi.row = 25;
   viomi.col = 80;
   VioSetMode(&viomi, 0);
}
------------- CODE ----------------------- CODE ----------------------
/-------------------------------------------------------------------\
|  The views expressed here are my own.  | Norm, what are you       |
|  They do not necessarily represent     | up too???                |
|  the views expressed by my employer.   |                          |
|                         ---------------| My ideal weight if I     |
|  colin@novell.com       | Novell Inc., | were 11 feet tall.       |
|  uunet!novell!colin     | San Jose     |                 - Cheers |
\-------------------------------------------------------------------/
Re: Using VioSetMode
#2367
Author: Terry Freas
Date: Fri, 11 Jan 1991 04:00
18 lines
1358 bytes
In article <2593@excelan.COM> colin@la.excelan.com (Colin Goldstein) writes:
>I have a question about using VioSetMode. I find that it only works
>some times. If I have the display in 80*50 mode and use VioSetMode
>to change it to 80*25, it works. However, if I'm in other modes such
>as 80*34 it does not work at all. And if I'm in 80*12 or 80*43, it
>only partially works. Although the screen changes to the correct 
>number of lines, the font is not the default font.
>
>I have enclosed the code I'm using to test this. Any help would be
>appreciated.
>
> [enclosed code deleted]

I have also noticed that I can set a text session to 80*60 using
'mode 80,60'.  However, the highest VioSetMode will achieve is
80*50.  Errors occur exceeding it.  Strange...
-- 
Jeremy Wohl / wohl@max.physics.sunysb.edu / cfreas@csserv1.ic.sunysb.edu
Re: Using VioSetMode
#2370
Author: Kai-Uwe Rommel
Date: Tue, 15 Jan 1991 13:33
28 lines
1800 bytes
In article <2593@excelan.COM> colin@la.excelan.com (Colin Goldstein) writes:
>I have a question about using VioSetMode. I find that it only works
>some times. If I have the display in 80*50 mode and use VioSetMode
>to change it to 80*25, it works. However, if I'm in other modes such
>as 80*34 it does not work at all. And if I'm in 80*12 or 80*43, it
>only partially works. Although the screen changes to the correct 
>number of lines, the font is not the default font.

>   viomi.cb = sizeof(viomi);
>   VioGetMode(&viomi, 0);
>
>   viomi.row = 25;
>   viomi.col = 80;
>   VioSetMode(&viomi, 0);

Try setting the hres and vres fields (screen pixel width/height) to to
appropriate values. For example, while 80x25 and 80x50 both work with
720x400, 80x34 works with 720x480! This should solve your problem.
Always calculate hres and vres from row/col and the font size (9x16,
9x14 and 9x8); hres is always 720 on VGA, vres has to be set by you.

Kai Uwe Rommel

--
/* Kai Uwe Rommel, Munich ----- rommel@lan.informatik.tu-muenchen.dbp.de */

DOS ... is still a real mode only non-reentrant interrupt
handler, and always will be.                -Russell Williams (MS)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads