Пример #1
0
void
TopWindow::set(const TCHAR *cls, const TCHAR *text,
               PixelScalar left, PixelScalar top,
               UPixelScalar width, UPixelScalar height)
{
  WindowStyle style;
  style.popup();

  screen.Set(width, height);

  /* apply the mode which was chosen by TopCanvas */
  width = screen.get_width();
  height = screen.get_height();

  ContainerWindow::set(NULL, 0, 0, width, height, style);

#ifndef ANDROID
#ifdef _UNICODE
  char text2[_tcslen(text) * 4];
  ::WideCharToMultiByte(CP_UTF8, 0, text, -1, text2, sizeof(text2),
                        NULL, NULL);
#else
  const char *text2 = text;
#endif

  ::SDL_WM_SetCaption(text2, NULL);
#endif
}
Пример #2
0
void
TopWindow::set(const TCHAR *cls, const TCHAR *text,
                int left, int top, unsigned width, unsigned height)
{
  WindowStyle style;
  style.popup();

  Window::set(NULL, cls, text, left, top, width, height, style);
}