I am using a standard graphics window, non GUI. Normally this wouldn't be much of an issue, but I am writing a networked game. This means the user can invoke the auto disconnect routine just by dragging the window for a few seconds. It really isn't the best way to keep packets in sync when the user can halt program execution either. How can I get around this?
Dragging Window = Halted Execution
BlitzMax Forums/BlitzMax Programming/Dragging Window = Halted Execution It appears the way to do this is within the System Mod, for which we have no source!
BUT we have a hack :D It's not ideal but it disables any clicking in the Titlebar area. It does need you to modify the d3d7graphics.bmx
Look for this function :
Put this code immediately beneath the function heading :-
And rebuilt modules.
BUT we have a hack :D It's not ideal but it disables any clicking in the Titlebar area. It does need you to modify the d3d7graphics.bmx
Look for this function :
Function WndProc( hwnd,message,wp,lp ) "win32"
Put this code immediately beneath the function heading :-
If message = WM_NCHITTEST If DefWindowProcA(hwnd, WM_NCHITTEST, wp, lp) = 2 Return EndIf
And rebuilt modules.
Thanks, Indie. It's working good for DX, any fix for OGL?
If anyone knows any other methods, please let me know.
If anyone knows any other methods, please let me know.
Works great. Thanks again :)
thread it
Can you elaborate, ol' engaged one?
well, if you stick your rendering/logic etc in a seperate thread etc, you can have it so that if someone drags the window around for like an hour (or less:P) it will still all update and you wont timeout (there was an example of this on one of the purebasic forums, opengl cube with threading i think it was)
(however if you want it crossplatform you will have to work out how todo it on all of course but i think its a better solution)
(however if you want it crossplatform you will have to work out how todo it on all of course but i think its a better solution)
It would be easier to write your own functions to move the screen.