Beispiel #1
0
  WNDPROC SetWndProc(WNDPROC wndproc)
  {
    AssertThread();

    return (WNDPROC)::SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)wndproc);
  }
Beispiel #2
0
  void SetCapture() {
    AssertNoneLocked();
    AssertThread();

    ::SetCapture(hWnd);
  }
Beispiel #3
0
  void ReleaseCapture() {
    AssertNoneLocked();
    AssertThread();

    ::ReleaseCapture();
  }
Beispiel #4
0
  void SetFocus() {
    AssertNoneLocked();
    AssertThread();

    ::SetFocus(hWnd);
  }
Beispiel #5
0
  void FocusParent() {
    AssertNoneLocked();
    AssertThread();

    ::SetFocus(::GetParent(hWnd));
  }
Beispiel #6
0
  void Show() {
    AssertThread();

    ::ShowWindow(hWnd, SW_SHOW);
  }
Beispiel #7
0
  void Hide() {
    AssertThread();

    ::ShowWindow(hWnd, SW_HIDE);
  }
Beispiel #8
0
  bool IsDown() const {
    AssertNoneLocked();
    AssertThread();

    return (Button_GetState(hWnd) & BST_PUSHED) != 0;
  }
Beispiel #9
0
  const Font &GetFont() const {
    AssertThread();
    assert(font != nullptr);

    return *font;
  }
Beispiel #10
0
  /**
   * Returns the parent's client area rectangle.
   */
#ifdef USE_WINUSER
  gcc_pure
  PixelRect GetParentClientRect() const {
    assert(IsDefined());

    HWND hParent = ::GetParent(hWnd);
    assert(hParent != nullptr);

    PixelRect rc;
    ::GetClientRect(hParent, &rc);
    return rc;
  }
#else
  gcc_pure
  PixelRect GetParentClientRect() const;
#endif

#ifndef USE_WINUSER
  virtual void Invalidate();
#else /* USE_WINUSER */
  HDC BeginPaint(PAINTSTRUCT *ps) {
    AssertThread();

    return ::BeginPaint(hWnd, ps);
  }
Beispiel #11
0
  void EndPaint(PAINTSTRUCT *ps) {
    AssertThread();

    ::EndPaint(hWnd, ps);
  }
Beispiel #12
0
  void SetUserData(void *value)
  {
    AssertThread();

    ::SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)value);
  }
Beispiel #13
0
  void ReleaseCapture() {
    AssertThread();

    ::ReleaseCapture();
  }
Beispiel #14
0
  void SetCapture() {
    AssertThread();

    ::SetCapture(hWnd);
  }
Beispiel #15
0
  void SetFocus() {
    AssertThread();

    ::SetFocus(hWnd);
  }
Beispiel #16
0
  bool is_down() const {
    assert_none_locked();
    AssertThread();

    return (Button_GetState(hWnd) & BST_PUSHED) != 0;
  }