ImgEdit_UI/ImgEdit_UI/ScrollWnd.cpp
void CScrollWnd::GetScrollBarSizes(CSize& sizeSb)
{
	sizeSb.cx = sizeSb.cy = 0;
	DWORD dwStyle = GetStyle();
	
	if (GetScrollBarCtrl(SB_VERT) == NULL)
	{
		// vert scrollbars will impact client area of this window
		sizeSb.cx = GetSystemMetrics(SM_CXVSCROLL);
		if (dwStyle & WS_BORDER)
			sizeSb.cx -= GetSystemMetrics(SM_CXBORDER);
	}
	if (GetScrollBarCtrl(SB_HORZ) == NULL)
	{
		// horz scrollbars will impact client area of this window
		sizeSb.cy = GetSystemMetrics(SM_CYHSCROLL);
		if (dwStyle & WS_BORDER)
			sizeSb.cy -= GetSystemMetrics(SM_CYBORDER);
	}
}
/////////////////////////////////////////////////////////////////////////////
// Tie to scrollbars and CWnd behaviour
Tie to scrollbars and CWnd behaviour
Tie to scrollbars and CWnd behaviour
void CScrollWnd::GetScrollBarSizes(CSize& sizeSb)
{
	sizeSb.cx = sizeSb.cy = 0;
	DWORD dwStyle = GetStyle();
	if (GetScrollBarCtrl(SB_VERT) == NULL)
	{
		sizeSb.cx = GetSystemMetrics(SM_CXVSCROLL);
		if (dwStyle & WS_BORDER)
			sizeSb.cx -= GetSystemMetrics(SM_CXBORDER);
	}
	if (GetScrollBarCtrl(SB_HORZ) == NULL)
	{
		sizeSb.cy = GetSystemMetrics(SM_CYHSCROLL);
		if (dwStyle & WS_BORDER)
			sizeSb.cy -= GetSystemMetrics(SM_CYBORDER);
	}
}
void CScrollWnd :: GetScrollBarSizes ( CSize & sizeSb ) { sizeSb . cx = sizeSb . cy = 0 ; DWORD dwStyle = GetStyle ( ) ; if ( GetScrollBarCtrl ( SB_VERT ) == NULL ) { sizeSb . cx = GetSystemMetrics ( SM_CXVSCROLL ) ; if ( dwStyle & WS_BORDER ) sizeSb . cx -= GetSystemMetrics ( SM_CXBORDER ) ; } if ( GetScrollBarCtrl ( SB_HORZ ) == NULL ) { sizeSb . cy = GetSystemMetrics ( SM_CYHSCROLL ) ; if ( dwStyle & WS_BORDER ) sizeSb . cy -= GetSystemMetrics ( SM_CYBORDER ) ; } }
Tie to scrollbars and CWnd behaviour
Tie to scrollbars and CWnd behaviour
// vert scrollbars will impact client area of this window // horz scrollbars will impact client area of this window