newntui/activex/queriescombo/src/queriescomboctl.cpp
//-----------------------------------------------------------------------------------------
// Callback runs every time WM_SIZE message comes. Make ListView fit in the window with 
// only 3D border extent.
//-----------------------------------------------------------------------------------------
Callback runs every time WM_SIZE message comes. Make ListView fit in the window with
only 3D border extent.
Callback runs every time WM_SIZE message comes . Make ListView fit in the window with only 3D border extent .
void CQueriesComboCtrl::OnSize(UINT nType, int cx, int cy)  {
	COleControl::OnSize(nType, cx, cy);
	if(::IsWindow(m_ListView)) {
		m_ListView.MoveWindow(::GetSystemMetrics(SM_CYEDGE),
			                  ::GetSystemMetrics(SM_CYEDGE),
							   cx-2*::GetSystemMetrics(SM_CYEDGE),
							   cy-2*::GetSystemMetrics(SM_CYEDGE),
							   TRUE);
	}
}
void CQueriesComboCtrl :: OnSize ( UINT nType , int cx , int cy ) { COleControl :: OnSize ( nType , cx , cy ) ; if ( :: IsWindow ( m_ListView ) ) { m_ListView . MoveWindow ( :: GetSystemMetrics ( SM_CYEDGE ) , :: GetSystemMetrics ( SM_CYEDGE ) , cx - 2 * :: GetSystemMetrics ( SM_CYEDGE ) , cy - 2 * :: GetSystemMetrics ( SM_CYEDGE ) , TRUE ) ; } }
Callback runs every time WM_SIZE message comes.
Callback runs every time WM_SIZE message comes .