Code by Gernot Frisch: :good:
For Win32:
Unborder(64,64)
FUNCTION foo:
ENDFUNCTION
INLINE
}
extern "C" int __stdcall GetWindowLongA(void*, int);
extern "C" int __stdcall SetWindowLongA(void*, int, int);
extern "C" int __stdcall SetWindowPos(void*, int, int, int, int, int, int);
#define GWL_STYLE (-16)
#define WS_POPUP 0x80000000L
#define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */
namespace __GLBASIC__ {
ENDINLINE
FUNCTION Unborder: x,y
LOCAL sx,sy
GETSCREENSIZE sx,sy
INLINE
int style = ::GetWindowLongA(GLBASIC_HWND(), GWL_STYLE);
style &= ~WS_CAPTION;
style |= WS_POPUP;
::SetWindowLongA(GLBASIC_HWND(), GWL_STYLE, style);
::SetWindowPos(GLBASIC_HWND(), -1, x,y,sx,sy,0);
ENDINLINE
ENDFUNCTION
Cool :nw:
Wenn man nun das Fenster selber etwas Transparent machen könnte oder ne bestimmte farbe.
Könnte man coole efekte bzw. Fenster machen.
Z.b ein Spiel laufen lasen und im hintergrund sieht man den Desktop oder ein gefaktes rundes fenster :)
Wir müssten eine separate Code ecke haben wo nur Inline sachen reinkommen.
Jo finde ich auch :)
Auch ne gute Idee, werden wir mal besprechen müssen!
vielleicht noch eine Anmerkung zu unborder...
GLOBAL sx, sy, w, h
GETSCREENSIZE sx, sy
GETDESKTOPSIZE w, h
Unborder(w/2-sx/2,h/2-sy/2)
da das Fenster standardmässig mittig gesetzt wird.
sonst taucht es wie im obigen code erst bei position 64,64 (oder whatever) auf und beim beenden nochmal mittig...
leider erscheint beim beenden nochmal kurz der rahmen, aber das ist ja nicht weiter tragisch.
Works in win7 X64 too... thanks!!!! :good:
i broke it
if i do this in 2d then later switch to 3d like going into a game....half of the screen gets black
display driver crashed, im using amd
solved the driver crash:
you cant change the input value of unborder...it must remain constant with each frame.