1
0
Fork 0

Platform/Win32/Win32Display: implement getPosition()

This commit is contained in:
Henrik Hautakoski 2020-11-04 19:27:24 +01:00
parent 70f73c1d52
commit d7d8a23dc2
2 changed files with 9 additions and 0 deletions

View file

@ -111,6 +111,13 @@ void Win32Display::setPosition(unsigned int x, unsigned int y)
::SetWindowPos(m_handle, NULL, x, y, 0, 0, SWP_NOSIZE);
}
Vector2u Win32Display::getPosition() const
{
RECT r;
GetWindowRect(m_handle, &r);
return Vector2u(r.left, r.top);
}
void Win32Display::setCaption(const std::string& caption)
{
::SetWindowText(m_handle, caption.c_str());

View file

@ -29,6 +29,8 @@ public :
virtual void setPosition(unsigned int x, unsigned int y);
virtual Vector2u getPosition() const;
virtual void setCaption(const std::string& caption);
virtual void setIcon(unsigned int width, unsigned int height, const uint8_t *pixels);