aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/wnd/wndclass/oswnd.cpp
blob: 021327ab10c6781f801858e33d90dd51b28da39d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <precomp.h>
#include "oswnd.h"

int OSWnd::onInit()
{
	OSWND_PARENT::onInit();
	onSetVisible(isVisible());
	return 1;
}

void OSWnd::onSetVisible(int show)
{
#ifdef WIN32
	ShowWindow(getOSHandle(), show ? SW_NORMAL : SW_HIDE);
#endif
}

int OSWnd::onResize()
{
	OSWND_PARENT::onResize();
#ifdef WIN32
	if (getOSHandle())
	{
		RECT r;
		getClientRect(&r);
		SetWindowPos(getOSHandle(), NULL, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOZORDER | SWP_NOACTIVATE);
	}
#endif
	return 1;
}