BASIC

Author Topic: Set Window Title  (Read 3815 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10723
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Set Window Title
« 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

Husten

  • Guest
Set Window Title
« Reply #1 on: 2008-Apr-10 »
bitte verschieben zu codeschnipsel ;)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10723
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Set Window Title
« Reply #2 on: 2008-Apr-10 »
Hä!?

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5028
  • O Rly?
    • View Profile
Set Window Title
« Reply #3 on: 2008-Apr-10 »
War im Wettbewerbe Forum.
Habs schon gemoved :)
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10723
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Set Window Title
« Reply #4 on: 2008-Apr-11 »
Doh! Danke.