本文整理汇总了C++中CN3UIBase::Save方法的典型用法代码示例。如果您正苦于以下问题:C++ CN3UIBase::Save方法的具体用法?C++ CN3UIBase::Save怎么用?C++ CN3UIBase::Save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CN3UIBase
的用法示例。
在下文中一共展示了CN3UIBase::Save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
bool CN3UIBase::Save(HANDLE hFile)
{
CN3BaseFileAccess::Save(hFile);
DWORD dwRWC = NULL;
// child 정보
int iCC = m_Children.size();
WriteFile(hFile, &iCC, sizeof(iCC), &dwRWC, NULL); // Child 갯수 ㅆ고..고..
for(UIListReverseItor itor = m_Children.rbegin(); m_Children.rend() != itor; ++itor)
// childadd할때 push_front이므로 저장할 때 거꾸로 저장해야 한다.
{
CN3UIBase* pChild = (*itor);
eUI_TYPE eUIType = pChild->UIType();
WriteFile(hFile, &eUIType, sizeof(eUIType), &dwRWC, NULL); // UI Type 쓰고..
pChild->Save(hFile);
}
// base 정보
int iIDLen = 0;
iIDLen = m_szID.size();
WriteFile(hFile, &iIDLen, sizeof(iIDLen), &dwRWC, NULL); // id length
if (iIDLen>0) WriteFile(hFile, m_szID.c_str(), iIDLen, &dwRWC, NULL); // ui id
WriteFile(hFile, &m_rcRegion, sizeof(m_rcRegion), &dwRWC, NULL); // m_rcRegion
WriteFile(hFile, &m_rcMovable, sizeof(m_rcMovable), &dwRWC, NULL); // m_rcMovable
WriteFile(hFile, &m_dwStyle, sizeof(m_dwStyle), &dwRWC, NULL); // style
WriteFile(hFile, &m_dwReserved, sizeof(m_dwReserved), &dwRWC, NULL); // m_dwReserved
int iTooltipLen = m_szToolTip.size();
WriteFile(hFile, &iTooltipLen, sizeof(iTooltipLen), &dwRWC, NULL); // tooltip문자열 길이
if (iTooltipLen>0) WriteFile(hFile, m_szToolTip.c_str(), iTooltipLen, &dwRWC, NULL);
int iSndFNLen = 0;
if (m_pSnd_OpenUI) iSndFNLen = m_pSnd_OpenUI->m_szFileName.size();
WriteFile(hFile, &iSndFNLen, sizeof(iSndFNLen), &dwRWC, NULL); // 사운드 파일 문자열 길이
if (iSndFNLen>0) WriteFile(hFile, m_pSnd_OpenUI->m_szFileName.c_str(), iSndFNLen, &dwRWC, NULL);
iSndFNLen = 0;
if (m_pSnd_CloseUI) iSndFNLen = m_pSnd_CloseUI->m_szFileName.size();
WriteFile(hFile, &iSndFNLen, sizeof(iSndFNLen), &dwRWC, NULL); // 사운드 파일 문자열 길이
if (iSndFNLen>0) WriteFile(hFile, m_pSnd_CloseUI->m_szFileName.c_str(), iSndFNLen, &dwRWC, NULL);
return true;
}