Codesnippets > Inline / 3rd party

Set Window Title

(1/1)

Kitty Hello:
...for Win32 and Linux. Mac gives compiler errors...


--- Code: (glbasic) --- 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
--- End code ---

Husten:
bitte verschieben zu codeschnipsel ;)

Kitty Hello:
Hä!?

Schranz0r:
War im Wettbewerbe Forum.
Habs schon gemoved :)

Kitty Hello:
Doh! Danke.

Navigation

[0] Message Index

Go to full version