|
keeping the window focus |
KaBlammyman
Member #455
June 2000
|
Hello, I have yet another win32 question (this isn't allegro related, but i guess it could be) thanx. P.S. I know that all events are being captured because a log file the program creates while it runs confirms this. Its just that the data isnt being transmitted over the network.
|
A J
Member #3,025
December 2002
|
then the program is broken. ___________________________ |
KaBlammyman
Member #455
June 2000
|
uummm no.::) I works fine when th window has focus. How do I know? Because I can have it start with or without a window via a text file. When the visible window has focus, it works fine. Maybe it doesn't need a visible window or window focus to work, but that was what I am guessing since it works fine when the window is visible and does have focus. I just need it to do what it has to do, even when other programs have the window focus.
|
adamk kromm
Member #5,432
January 2005
|
i dont know if this will work but it might. set_display_switch_mode(SWITCH_BACKGROUND); what this does is stops your program from "pausing" when its not the active window... EDIT: here is the page describing it http://www.allegro.cc/manual/api/graphics-modes/set_display_switch_mode ---------- |
A J
Member #3,025
December 2002
|
Sounds like it needs a window to capture mouse events. Have you read all the requirements of the window hooks functions on MSDN ? ___________________________ |
KaBlammyman
Member #455
June 2000
|
The hook part works fine (my log file shows e that everything is cought)...its the auctual sending of data that doesnt work without widnow focus.
|
Synapse Jumps
Member #3,073
December 2002
|
Did you try set_switch_display_mode? |
A J
Member #3,025
December 2002
|
that doesn't make any sense, sending network data has absolutely zero to do with windows/focus. ___________________________ |
CGamesPlay
Member #2,559
July 2002
|
The only things set_display_switch_mode affects (aside from possibly some graphics driver adjustments) are timer interrupts: Allegro doesn't send them when the window doesn't have focus. Other timing methods work normally. -- Ryan Patterson - <http://cgamesplay.com/> |
KaBlammyman
Member #455
June 2000
|
Quote: that doesn't make any sense, sending network data has absolutely zero to do with windows/focus. thats what I thought...but unless the window has focus, the data wont be sent. I telnet'ed (since the final product will communicate with telnet) to myself, so thats how i can tell if the data is being sent or not. update if the mouse is over the window, it will send data...even if it isn't the top window/focused window.
|
|