예제 #1
0
COXStatusbarSkin* COXStatusBar::GetStatusbarSkin()
{
	// Check if the app is derived from COXSkinnedApp
	COXSkinnedApp* pSkinnedApp = DYNAMIC_DOWNCAST(COXSkinnedApp, AfxGetApp());
	if (pSkinnedApp != NULL && pSkinnedApp->GetCurrentSkin() != NULL)
		return pSkinnedApp->GetCurrentSkin()->GetStatusbarSkin();
	else
	{
		// Create a classic skin for this class if not created already
		if (m_pStatusbarSkin == NULL)
			m_pStatusbarSkin = new COXStatusbarSkinClassic();

		return m_pStatusbarSkin;
	}
}
예제 #2
0
void COXCustomizeToolbarsPage::OnInitDialog()
{
	// must call default implementation
	COXCustomizePage::OnInitDialog();

	// add here initialization code for your demo dialog. Treat it as a
	// normal CDialog::OnInitDialog function

	// separator controls
	COLORREF clr=::GetSysColor(COLOR_WINDOW);
	m_sepToolbars.SetTextColor(clr);
	m_sepOptions.SetTextColor(clr);
	m_sepOperations.SetTextColor(clr);

	// spin control
	m_spinBorderSize.SetRange(0,1000);

	GetVars();

	// layout
	//
	m_LayoutManager.TieChild(&m_treeToolbars,OX_LMS_ANY,OX_LMT_SAME);
	m_LayoutManager.TieChild(&m_sepToolbars,OX_LMS_LEFT|OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(&m_sepOperations,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(&m_sepOptions,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_BUTTON_NEW,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_BUTTON_DELETE,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_BUTTON_RENAME,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_BUTTON_RESET,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_BUTTON_RESET_ALL,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_CHECK_TOOLTIPS,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_CHECK_COOL,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_CHECK_GRIPPER,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_STATIC_BORDER_SIZE,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_EDIT_BORDER_SIZE,OX_LMS_RIGHT,OX_LMT_SAME);
	m_LayoutManager.TieChild(IDC_OX_SPIN_BORDER_SIZE,OX_LMS_RIGHT,OX_LMT_SAME);
	//
	///////////////////////////////////////

	// If the OfficeXP skin is on disable the CoolLook checkbox
	COXSkinnedApp* pSkinnedApp = DYNAMIC_DOWNCAST(COXSkinnedApp, AfxGetApp());
	if (pSkinnedApp != NULL)
	{
		COXSkin* pCurrentSkin = pSkinnedApp->GetCurrentSkin();
		if (pCurrentSkin != NULL)
			if (pCurrentSkin->GetName() == _T("Office XP"))
			{
				CButton* pBtn = (CButton*) GetDlgItem(IDC_OX_CHECK_COOL);
				pBtn->SetCheck(TRUE);
				pBtn->EnableWindow(FALSE);
			}
	}

	m_bInitialized=TRUE;

	UpdateState();
}