szSection, _T("sizeVertCY"), m_szVert.cy));
m_szFloat.cx = max(m_szMinFloat.cx, (int) pApp->GetProfileInt(
szSection, _T("sizeFloatCX"), m_szFloat.cx));
m_szFloat.cy = max(m_szMinFloat.cy, (int) pApp->GetProfileInt(
szSection, _T("sizeFloatCY"), m_szFloat.cy));
}
void CSizingControlBar::SaveState(LPCTSTR lpszProfileName)
{
// place your SaveState or GlobalSaveState call in
// CMainFrame's OnClose() or DestroyWindow(), not in OnDestroy()
ASSERT_VALID(this);
ASSERT(GetSafeHwnd());
CWinApp* pApp = AfxGetApp();
TCHAR szSection[256];
wsprintf(szSection, _T("%s-SCBar-%d"), lpszProfileName,
GetDlgCtrlID());
pApp->WriteProfileInt(szSection, _T("sizeHorzCX"), m_szHorz.cx);
pApp->WriteProfileInt(szSection, _T("sizeHorzCY"), m_szHorz.cy);
pApp->WriteProfileInt(szSection, _T("sizeVertCX"), m_szVert.cx);
pApp->WriteProfileInt(szSection, _T("sizeVertCY"), m_szVert.cy);
pApp->WriteProfileInt(szSection, _T("sizeFloatCX"), m_szFloat.cx);
pApp->WriteProfileInt(szSection, _T("sizeFloatCY"), m_szFloat.cy);
}
void CSizingControlBar::GlobalLoadState(CFrameWnd* pFrame,
LPCTSTR lpszProfileName)
{
POSITION pos = pFrame->m_listControlBars.GetHeadPosition();
while (pos != NULL)
{
CSizingControlBar* pBar =
(CSizingControlBar*) pFrame->m_listControlBars.GetNext(pos);
ASSERT(pBar != NULL);
if (pBar->IsKindOf(RUNTIME_CLASS(CSizingControlBar)))
pBar->LoadState(lpszProfileName);
}
}
void CSizingControlBar::GlobalSaveState(CFrameWnd* pFrame,
LPCTSTR lpszProfileName)
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-36846-31.html
人口只及中国的十分之一
写几亿个字儿也是毫无价值的