Set Window Title

Previous topic - Next topic

Kitty Hello

...for Win32 and Linux. Mac gives compiler errors...

Code (glbasic) Select
SetWindowText("Nahuu!")
SHOWSCREEN
MOUSEWAIT


FUNCTION end_main:
ENDFUNCTION

INLINE
}
#ifdef WIN32
extern "C" __stdcall int SetWindowTextA(void*, const char*);
#endif
#if defined( LINUX) || defined (MACOSX)
extern "C" void SDL_WM_SetCaption  (const char *title, const char *icon);
#endif
namespace __GLBASIC__{
ENDINLINE


FUNCTION SetWindowText: t$
INLINE
#ifdef WIN32
::SetWindowTextA(GLBASIC_HWND(), t_Str.c_str());
#endif
#if defined( LINUX) || defined (MACOSX)
::SDL_WM_SetCaption(t_Str.c_str(), t_Str.c_str());
#endif
ENDINLINE
ENDFUNCTION

Husten

bitte verschieben zu codeschnipsel ;)

Kitty Hello


Schranz0r

War im Wettbewerbe Forum.
Habs schon gemoved :)
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Kitty Hello

Doh! Danke.