Example #1
0
int main()
{
  Window w;

  assert(w.GetHWND() == NULL, "Null hwnd");

  w.SetSize(500, 500);
  w.Open();
  cout << "Visual Test" << endl;

  assert(w.GetHWND() != NULL, "Non-NULL hwnd");
  assert(w.GetWidth() == 500, "width get-set");

  {
    HWND wnd = w.GetHWND();
    RECT r;
    GetClientRect(wnd, &r);
    assert(r.right - r.left == 500, "width client size set");
  }

  cout << "User Tests. Press ESC to finish" << endl;
  while (!GetAsyncKeyState(VK_ESCAPE))
    w.ProcessMessages();

  std::cout << "Tests concluded" << std::endl;

  return 0;
}
Example #2
0
	int WindowHeight(const Window& w){
		return WindowHeight(w.GetHWND());
	}
Example #3
0
	int WindowWidth(const Window& w){
		return WindowWidth(w.GetHWND());
	}