/////////////////////////////////////////////////////////////////////////////
// CConfigDisplay message handlers
BOOL CConfigDisplay::OnInitDialog()
{
    AutoLog alog("CCD::OnInitDialog");
    CPropertyPage::OnInitDialog();

    m_FontPanel.Initialize();
    m_FontTitles.Initialize();
    m_FontColHdr.Initialize();

    AutoBuf buf(5);
    int i;

    m_SizeTitles.ResetContent();
    m_SizePanel.ResetContent();
    m_SizeColHdr.ResetContent();
    m_BorderWidth.ResetContent();

    for (i = 5 ; i < 40; ++i) {
        sprintf(buf.p, "%d", i);
        m_SizeTitles.AddString(buf.p);
        m_SizePanel.AddString(buf.p);
        m_SizeColHdr.AddString(buf.p);
    }

    for (i = 0 ; i < 40; ++i) {
        sprintf(buf.p, "%d", i);
        m_BorderWidth.AddString(buf.p);
    }

    readSkins();
    initFontSels();

    int sel = m_SkinList.SelectString(-1, m_sSkinName);
    m_SkinList.SetCurSel(sel);
    OnSkinChoose();

    sel = m_BorderWidth.SelectString(-1, numToString(m_vBorderWidth));
    m_BorderWidth.SetCurSel(sel);

    showSample();

    m_Modified = FALSE;

#ifndef _DEBUG
    m_MakeDefault.ShowWindow(SW_HIDE);
#endif

    EnableDisable();


    return TRUE;  // return TRUE unless you set the focus to a control
    // EXCEPTION: OCX Property Pages should return FALSE
}
void CConfigDisplay::On3dStatus() {
    m_3dStatus = m_3dStatusCheck.GetCheck();
    EnableDisable();
    modified(TRUE);
    showSample();
}
void CConfigDisplay::On3dData() {
    m_3dData = m_3dDataCheck.GetCheck();
    EnableDisable();
    modified(TRUE);
    showSample();
}
void CConfigDisplay::On3dColHdrs() {
    m_3dColHdr = m_3dColHdrsCheck.GetCheck();
    EnableDisable();
    modified(TRUE);
    showSample();
}
void
CConfigDisplay::ReadReg(RegistryKey & reg) {
    AutoLog alog("CCD::ReadReg");

    m_vBkPanel = reg.Read(RegWindowsColorBkPanel, m_vBkPanel);
    m_vBkNormal = reg.Read(RegWindowsColorBkNormal, m_vBkNormal);
    m_vBkHigh = reg.Read(RegWindowsColorBkHigh, m_vBkHigh);
    m_vBkSel = reg.Read(RegWindowsColorBkSel, m_vBkSel);
    m_vTxPanel = reg.Read(RegWindowsColorTxPanel, m_vTxPanel);
    m_vTxNormal = reg.Read(RegWindowsColorTxNormal, m_vTxNormal);
    m_vTxHigh = reg.Read(RegWindowsColorTxHigh, m_vTxHigh);
    m_vTxSel = reg.Read(RegWindowsColorTxSel, m_vTxSel);
    m_vBkColHdr = reg.Read(RegWindowsColorBkColHdr, m_vBkColHdr);
    m_vTxColHdr = reg.Read(RegWindowsColorTxColHdr, m_vTxColHdr);

    MBCONFIG_READ_COLOR_3D(reg,MB3DCOLHDRCOLOR,
                           m_vcrColHdrInUL,m_vcrColHdrInLR,m_vcrColHdrOutUL,m_vcrColHdrOutLR);

    MBCONFIG_READ_COLOR_3D(reg,MB3DDATACOLOR,
                           m_vcrDataInUL,m_vcrDataInLR,m_vcrDataOutUL,m_vcrDataOutLR);

    MBCONFIG_READ_COLOR_3D(reg,MB3DSTATUSCOLOR,
                           m_vcrStatusInUL,m_vcrStatusInLR,m_vcrStatusOutUL,m_vcrStatusOutLR);

    m_3dData = reg.Read(MB3DDATA,0);
    m_3dColHdr = reg.Read(MB3DCOLHDRS,0);
    m_3dStatus = reg.Read(MB3DSTATUS,0);

    if (IsWindow(m_3dDataCheck.m_hWnd)) {
        m_3dColHdrsCheck.SetCheck(m_3dColHdr);
        m_3dDataCheck.SetCheck(m_3dData);
        m_3dStatusCheck.SetCheck(m_3dStatus);
    }

    v2m();

    m_vBorderWidth = reg.Read(RegWindowsBorderWidth, m_vBorderWidth);
    m_vBorderHorz = reg.Read(RegWindowsBorderHorz, m_vBorderHorz);
    m_vBorderVert = reg.Read(RegWindowsBorderVert, m_vBorderVert);

    int sel;
    if (IsWindow(m_BorderWidth.m_hWnd)) {
        sel = m_BorderWidth.SelectString(-1, numToString(m_vBorderWidth));
        m_BorderWidth.SetCurSel(sel);
    }

    AutoBuf buf(1000);

    reg.Read(RegWindowsFontTitles, buf.p, 999, "");
    if (MBUtil::ConfigFontValidate(buf.p) && strlen(buf.p) > MBCCFONTFACEPOS) {
        MBUtil::FontStr2LogFont(buf.p, &m_lfTitles);
    }

    reg.Read(RegWindowsFontPanel, buf.p, 999, "");
    if (MBUtil::ConfigFontValidate(buf.p) && strlen(buf.p) > MBCCFONTFACEPOS) {
        MBUtil::FontStr2LogFont(buf.p, &m_lfPanel);
    }

    reg.Read(RegWindowsFontColHdr, buf.p, 999, "");
    if (MBUtil::ConfigFontValidate(buf.p) && strlen(buf.p) > MBCCFONTFACEPOS) {
        MBUtil::FontStr2LogFont(buf.p, &m_lfColHdr);
    }

    EnableDisable();

}
Beispiel #6
0
void CYPSettings::OnPublic() 
{
    UpdateData(TRUE);
	// TODO: Add your control notification handler code here
    EnableDisable();
}
Beispiel #7
0
void CYPSettings::OnPublic() 
{
    UpdateData(TRUE);
    EnableDisable();
}