예제 #1
0
void MResizable::OnParentCreate(HWND hwndParent, BOOL bEnableResize)
{
    assert(hwndParent);
    assert(::IsWindow(hwndParent));

    m_hwndParent = hwndParent;

    ClearLayouts();

    // NOTE: The parent window must be initially WS_THICKFRAME.
    assert(::GetWindowLong(hwndParent, GWL_STYLE) & WS_THICKFRAME);
    EnableResize(bEnableResize);
}
예제 #2
0
int CBCGPBaseFilterPopupMenu::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	const int iResizeBarBarHeight = 9;

	if (CBCGPPopupMenu::OnCreate(lpCreateStruct) == -1)
		return -1;

	if (!m_wndList.Create(CBCGPGridFilterListDlg::IDD, this))
	{
		ASSERT (FALSE);
		return -1;
	}

	m_wndList.ShowWindow(SW_SHOWNOACTIVATE);

	m_wndList.SetFont(&globalData.fontRegular);
	m_wndList.SetOwner(GetTopLevelFrame ());

	CRect rectList;
	m_wndList.GetWindowRect(rectList);

#ifndef _BCGSUITE_
	const int nGutterWidth = m_wndMenuBar.GetGutterWidth();
#else
	const int nGutterWidth = 0;
#endif

	m_wndMenuBar.m_nListWidth = rectList.Width() + nGutterWidth;

	m_iLogoWidth = rectList.Height();

	CSize sizeMenu = m_FinalSize;
	
	sizeMenu.cx = max(rectList.Width() + nGutterWidth, sizeMenu.cx);
	sizeMenu.cy += m_iLogoWidth - iResizeBarBarHeight;

	EnableResize(sizeMenu);
	return 0;
}