www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/06/14:09:55

Message-ID: <3461CF64.32B0@alum.mit.edu>
Date: Thu, 06 Nov 1997 09:08:53 -0500
From: "N. D. Culver" <ndc AT alum DOT mit DOT edu>
Reply-To: ndc AT alum DOT mit DOT edu
Organization: Oxbow Software
MIME-Version: 1.0
To: djgpp AT delorie DOT com
CC: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>,
Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: WIN95 and Alt Esc or Ctl Esc
References: <1 DOT 5 DOT 4 DOT 32 DOT 19971106130251 DOT 006c5244 AT dce03 DOT ipt DOT br>

Cesar Scarpini Rabak wrote:
> 
> At 12:38 06/11/97 +0200, Eli Zaretskii wrote:
> >
> >On Wed, 5 Nov 1997, N. D. Culver wrote:
> >
> >> Is it possible to detect when the user types Alt Esc or Ctl Esc
> >> when running DJGPP in Dos Box full screen mode under WIN 95/NT?
> >
> >Your description implies that you want something different: you want
> >to know, from within a running program, whether it was minimized and
> >then maximized again.  The keys that were used for that are NOT what
> >you are after.  Is that correct?

Yes and no, the specific user action is irrelevant, it is the min/max
event that is important, although examining the keystroke before WIN95
handles it would work if that is possible. I understand that WIN95/NT
sends a WM_MINIMIZED and a WM_MAXIMIZED message to WIN3x programs but
I doubt that a DOS .exe program can gain access to such services. Hmm,
it
would be interesting to add PE format functionality to the DJGPP linker.
I wrote one of these a couple of years ago, but that was a lot of work.

> >If it is, then I don't think Windows has an easily-used service for
> >that.  You might try two related services that I found by quickly
> >searching Ralf Brown's Interrupt List (see below).
> >
> [snipped]

Why didn't I think of that, thanks.

> >--------W-2F1684BX7FE0-----------------------
> >INT 2F - MS Windows - VSWITCHD - GET API ENTRY POINT
> >       AX = 1684h
> >       BX = 7FE0h (virtual device ID for VSWITCHD device) (see #2329)
> >       ES:DI = 0000h:0000h
> >Return: ES:DI -> VxD API entry point (see #2402)
> >                 0000h:0000h if the VxD does not support an API
> >
> >(Table 2402)
> >Call VSWITCHD entry point with:
> >       AX = function
> >           0000h toggle windowed mode (simulate Alt-Enter keypress)
> >               Return: nothing
> >           0001h get windowed mode
> >               Return: CF clear if VM is windowed
> >                       CF set if VM is full-screen
> >SeeAlso: #2399,#2403
> >
> 
> FWIW I've tested the method using the API below and it works like a charm!
> 
> OTOH, I did not figure out how to use the APIs mentioned above, but if any
> of you folks would like to share experiences with me, pls e-mail me
> personally.
> 
> >--------W-2F168B-----------------------------
> >INT 2F - MS Windows 3.1 - SET FOCUS TO SPECIFIED VIRTUAL MACHINE
> >       AX = 168Bh
> >       BX = virtual machine ID (see AX=1683h), 0000h for current DOS box
> >Return: AL = 00h if focus set to specified VM
> >Notes: documented on the Microsoft Developer's Network CD-ROM
> >       if the VM is a windowed DOS box, it will be set to full screen
> >SeeAlso: AX=1683h
> >--------W-2F168C-----------------------------
> >
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
> DME/ASC                                   Phone: 55-11-268-3522 Ext.350
> IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
> Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks guys, you have pointed me in the right direction. I'll report
back
when I get the working answer.

NDC

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019