|
Switching active display window |
Malcolm Harrow
Member #15,833
December 2014
|
I'm porting an Allegro 4 program to Allegro 5. Some details are here: http://www.stardot.org.uk/forums/viewtopic.php?f=44&t=9065 This is an emulator for a 1980s home computer called the Acorn Atom. The original program allows you to set a breakpoint so that when the emulator hits a certain memory address, the emulator pauses and a debug console is opened. I can't quite get this to work in Allegro 5. What I need is a way to force a switch of focus from one window (display) to another. i.e. from the display running the emulated computer into the debug console. At the point I want to switch the display, I've tried things like al_resize_display() and al_set_window_position() to try to change the focus but with no luck. Any ideas or suggestions ? Malcolm |
Edgar Reynaldo
Major Reynaldo
May 2007
|
On Windows, you can use the following code : #include "windows.h" //... SetForegroundWindow(al_get_win_window_handle(display));
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|