Exemplo n.º 1
0
BOOL CTestList::Create( CWnd* pParentWnd )
{
  BOOL b = CSizingControlBarG::Create( _T("Test list"), pParentWnd, 1967, WS_CLIPCHILDREN );

	SetSCBStyle(GetSCBStyle() | SCBS_SHOWEDGES | SCBS_SIZECHILD);

  if( !b )
		return FALSE;

	SetBarStyle( GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC );

	m_treeList.Create( WS_VISIBLE | WS_CHILD | TVS_LINESATROOT | TVS_HASBUTTONS | TVS_HASLINES | TVS_SHOWSELALWAYS, CRect( 0, 0, 0, 0 ), this, IDC_TREE );

	if( !AddFilesFromPath( GetModulePath( NULL ) + _T("\\Test files\\"), TVI_ROOT ) )
	{
		AddFilesFromPath( GetModulePath( NULL ) +  _T("../../\\components\\QHTM\\Test\\Test files\\"), TVI_ROOT );
	}


	CFont font;
	font.CreateStockObject( DEFAULT_GUI_FONT );
	m_treeList.SetFont( &font );

  return TRUE;
}
Exemplo n.º 2
0
int RPDockWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CSizingControlBarG::OnCreate(lpCreateStruct) == -1)
		return -1;

	SetSCBStyle( GetSCBStyle() | SCBS_SHOWEDGES | SCBS_SIZECHILD );
	
	return 0;
}
Exemplo n.º 3
0
CCoolBar::CCoolBar() {
    m_hNotifyWnd = NULL;
    m_cyGripper = 12;
    SetSCBStyle(GetSCBStyle() |	SCBS_SIZECHILD);
    m_bActive = FALSE;
    CDC dc;
    dc.CreateCompatibleDC(NULL);
    m_sFontFace = (::EnumFontFamilies(dc.m_hDC,
                                      _T("宋体"), (FONTENUMPROC) EnumFontFamProc, 0) == 0) ?
                  _T("宋体") : _T("Tahoma");
    dc.DeleteDC();
}
Exemplo n.º 4
0
//-------------------------------------------------------------------//
// OnCreate()																			//
//-------------------------------------------------------------------//
// Create the bar.
//-------------------------------------------------------------------//
int DialogBar::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	// Use the FontDlg version, not CDialog.
	m_pDlg->Create( this );

	// We want to size our child (the dialog) when we get sized.
	SetSCBStyle( GetSCBStyle() | SCBS_SIZECHILD );

	CRect rectFrame;
	m_pParent->GetWindowRect( rectFrame );

	CRect rectDlg;
	m_pDlg->GetWindowRect( rectDlg );

	// lpCreateStruct->cx = rectDlg.Width();

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

	#pragma _TODO("Figure out how to resize the bar here to match the width of the dialog")
	
	SetWindowPos( NULL, 0, 0, rectDlg.Width(), rectFrame.Height(), SWP_NOZORDER|SWP_NOMOVE );
	
	
	/*

	rectDlg.bottom = rectFrame.Height();
	rectDlg.right = rectDlg.Width();
	rectDlg.top = 0;
	rectDlg.left = 0;
	MoveWindow( rectDlg );

	OnSize( SIZE_RESTORED , rectDlg.Width(), rectFrame.Height() );
	
	m_pDockSite->DelayRecalcLayout();

	// CalcFixedLayout( false, false );

	*/
		   
	return 0;

}
Exemplo n.º 5
0
int CMyBar::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (baseCMyBar::OnCreate(lpCreateStruct) == -1)
		return -1;

	SetSCBStyle(GetSCBStyle() | SCBS_SHOWEDGES | SCBS_SIZECHILD);

	if (!m_wndChild.Create(WS_CHILD|WS_VISIBLE|
			ES_MULTILINE|ES_WANTRETURN|ES_AUTOVSCROLL,
		CRect(0,0,0,0), this, 123))
		return -1;

	m_wndChild.ModifyStyleEx(0, WS_EX_CLIENTEDGE);

	// older versions of Windows* (NT 3.51 for instance)
	// fail with DEFAULT_GUI_FONT
	if (!m_font.CreateStockObject(DEFAULT_GUI_FONT))
		if (!m_font.CreatePointFont(80, "MS Sans Serif"))
			return -1;

	m_wndChild.SetFont(&m_font);

	return 0;
}