BBC BASIC for Windows
Programming >> Graphics and Games >> Full-screen http://bb4w.conforums.com/index.cgi?board=graphics&action=display&num=1381336938 Full-screen
Post by Usama Amin on Oct 9th, 2013, 4:42pm
Hi guys, I am currently working on a game in which a certain key is pressed to toggle full screen, to enter full screen I am using the following code: GWL_STYLE = -16 HWND_TOPMOST = -1 WS_VISIBLE = &10000000 WS_CLIPCHILDREN = &2000000 WS_CLIPSIBLINGS = &4000000 SYS "GetSystemMetrics", 0 TO xscreen% SYS "GetSystemMetrics", 1 TO yscreen% SYS "SetWindowLong", @hwnd%, GWL_STYLE, WS_VISIBLE + \ \ WS_CLIPCHILDREN + WS_CLIPSIBLINGS SYS "SetWindowPos", @hwnd%, HWND_TOPMOST, 0, 0, xscreen%, yscreen%, 0 can anybody tell me how to get out without terminating the program? Thanks Usama
Re: Full-screen
Post by admin on Oct 9th, 2013, 5:31pm
can anybody tell me how to get out without terminating the program?
You mean to restore it to a regular window? Basically you simply need to reverse the effects of the SetWindowLong and SetWindowPos, something like this: