Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE3039401@probe-2.acclaim-euro.net> From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: simulate_keypress(256) ?? Date: Mon, 6 Jul 1998 13:52:07 +0100 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk new6ie AT aol DOT com writes: > I'm writing a dos program with allegro's keyboard handler > installed. I'd like for my program to be able to send the > Alt+Esc keycode so as to minimize my full screen dos program > to the win95 taskbar. I wrote a quick program (and ran it > under dos 6.22) to get the keycode for Alt+Esc and found it > to be "256", so I tried simulate_keypress(256); but as you > can guess it didn't work. Where did I go astray? The simulate_keypress() function adds an entry to the Allegro keyboard buffer, but this has nothing to do with the win95 input handling mechanism. I'm not aware of any way for a DOS program to fake keypresses that far up the chain, because win95 processes these events many levels higher than anything that your program has access to. There may be some special API functions that you can use to minimise your program (look in the Interrupt List), but I have no experience of that. Shawn Hargreaves.