void CColorStatic::SetLabelQuery(UINT nID, CWnd *pParent) { SubclassDlgItem(nID, pParent); m_bIsTransParent = FALSE; m_nBkColor = PASSECK_DIALOG_BKCOLOR; SetLogoFont(DEFAULT_FONT, DEFAULT_HEIGHT); SetColor(COLOR_TEXT_NORMAL); }
void CColorStatic::SetLabelEx(UINT nID, CWnd *pParent) { SubclassDlgItem(nID, pParent); m_bIsTransParent = FALSE; m_nBkColor = COLOR_TORJAN_BK; SetLogoFont(DEFAULT_FONT, DEFAULT_HEIGHT); SetColor(~COLOR_TORJAN_BK); }
BOOL CScrGeniusDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon //在此将两按钮设为不平面状显示,颜色和自定义窗体色相同 m_Button1.SubclassDlgItem(IDC_DIRBROWSER, this); m_Button1.SetActiveBgColor(RGB(240,200,90)); m_Button1.SetInactiveBgColor(RGB(240,200,90)); m_Button1.SetInactiveFgColor(RGB(0,0,255)); m_Button1.SetActiveFgColor(RGB(0,255,0)); m_Button1.SetTrickButton(true); //设此按钮为随鼠标自移动郊果,不让鼠标碰上 // m_Button1.SetIcon(IDI_CANCEL); m_Button1.SetFlat(false); //不扁平显示 m_Button2.SubclassDlgItem(IDC_FILEBROWSER, this); m_Button2.SetActiveBgColor(RGB(240,200,90)); m_Button2.SetInactiveBgColor(RGB(240,200,90)); m_Button2.SetInactiveFgColor(RGB(0,0,255)); m_Button2.SetActiveFgColor(RGB(0,255,0)); // m_Button2.SetIcon(IDI_OK); m_Button2.SetTooltipText(IDS_TOOLTIP_EXIT); m_Button2.SetFlat(false); //不扁平显示 m_Button2.SetBtnCursor(IDC_HAND); SetLogoFont("宋体", 17); //初始化设置显示3D字体名称和大小 // 下面代码为建立特殊窗体显示(椭圆) // CRect cRect; // CRgn wndRgn, rgnTemp; // GetWindowRect(&cRect); // wndRgn.CreateEllipticRgn(0, 0,cRect.Width(),cRect.Height()); // SetWindowRgn((HRGN)wndRgn, TRUE); return TRUE; // return TRUE unless you set the focus to a control }
MPCLogoPane::MPCLogoPane() { SetLogoFont("Arial"); }