GLBasic forum

Codesnippets => Inline / 3rd party => Topic started by: Kitty Hello on 2008-Apr-10

Title: Set Window Title
Post by: Kitty Hello on 2008-Apr-10
...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
Title: Set Window Title
Post by: Husten on 2008-Apr-10
bitte verschieben zu codeschnipsel ;)
Title: Set Window Title
Post by: Kitty Hello on 2008-Apr-10
Hä!?
Title: Set Window Title
Post by: Schranz0r on 2008-Apr-10
War im Wettbewerbe Forum.
Habs schon gemoved :)
Title: Set Window Title
Post by: Kitty Hello on 2008-Apr-11
Doh! Danke.