本文整理汇总了C++中CLanguage::XMLParse方法的典型用法代码示例。如果您正苦于以下问题:C++ CLanguage::XMLParse方法的具体用法?C++ CLanguage::XMLParse怎么用?C++ CLanguage::XMLParse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLanguage
的用法示例。
在下文中一共展示了CLanguage::XMLParse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitDialog
ATMO_BOOL CAtmoColorPicker::InitDialog(WPARAM wParam)
{
CLanguage *Lng = new CLanguage;
HWND hwndCtrl;
hwndCtrl = this->getDlgItem(IDC_EDT_RED);
Edit_LimitText(hwndCtrl,3);
hwndCtrl = this->getDlgItem(IDC_EDT_GREEN);
Edit_LimitText(hwndCtrl,3);
hwndCtrl = this->getDlgItem(IDC_EDT_BLUE);
Edit_LimitText(hwndCtrl,3);
hwndCtrl = this->getDlgItem(IDC_SL_RED);
SendMessage(hwndCtrl, TBM_SETRANGEMIN, 0, 0);
SendMessage(hwndCtrl, TBM_SETRANGEMAX, 0, 255);
SendMessage(hwndCtrl, TBM_SETPOS, 1, this->m_iRed);
SendMessage(hwndCtrl, TBM_SETTICFREQ, 8, 0);
hwndCtrl = this->getDlgItem(IDC_SL_GREEN);
SendMessage(hwndCtrl, TBM_SETRANGEMIN, 0, 0);
SendMessage(hwndCtrl, TBM_SETRANGEMAX, 0, 255);
SendMessage(hwndCtrl, TBM_SETPOS, 1, this->m_iGreen);
SendMessage(hwndCtrl, TBM_SETTICFREQ, 8, 0);
hwndCtrl = this->getDlgItem(IDC_SL_BLUE);
SendMessage(hwndCtrl, TBM_SETRANGEMIN, 0, 0);
SendMessage(hwndCtrl, TBM_SETRANGEMAX, 0, 255);
SendMessage(hwndCtrl, TBM_SETPOS, 1, this->m_iBlue);
SendMessage(hwndCtrl, TBM_SETTICFREQ, 8, 0);
UpdateColorControls(ATMO_TRUE, ATMO_TRUE);
Lng->szCurrentDir[Lng->SetLngPath()];
sprintf(Lng->szFileINI, "%s\\Language.ini\0", Lng->szCurrentDir);
GetPrivateProfileString("Common", "Language", "English", Lng->szLang, 256, Lng->szFileINI);
// Read Buffer from IniFile
sprintf(Lng->szTemp, "%s\\%s.xml\0", Lng->szCurrentDir, Lng->szLang);
Lng->XMLParse(Lng->szTemp, Lng->sTextCPicker, "ColorPicker");
SendMessage(getDlgItem(IDC_STATIC22), WM_SETTEXT, 0, (LPARAM)(LPCTSTR)(Lng->sTextCPicker[0]));
SendMessage(getDlgItem(IDC_STATIC23), WM_SETTEXT, 0, (LPARAM)(LPCTSTR)(Lng->sTextCPicker[1]));
SendMessage(getDlgItem(IDC_STATIC24), WM_SETTEXT, 0, (LPARAM)(LPCTSTR)(Lng->sTextCPicker[2]));
SendMessage(this->m_hDialog, WM_SETTEXT, 0, (LPARAM)(LPCTSTR)(Lng->sTextCPicker[3]));
SendMessage(getDlgItem(IDCANCEL), WM_SETTEXT, 0, (LPARAM)(LPCTSTR)(Lng->sTextCPicker[4]));
return ATMO_TRUE;
}
示例2: InitDialog
ATMO_BOOL CAtmoGradients::InitDialog(WPARAM wParam)
{
HWND groupBox = getDlgItem( IDC_ZONE_GROUP );
CLanguage *Lng = new CLanguage;
Lng->szCurrentDir[Lng->SetLngPath()];
sprintf(Lng->szFileINI, "%s\\Language.ini\0", Lng->szCurrentDir);
GetPrivateProfileString("Common", "Language", "English", Lng->szLang, 256, Lng->szFileINI);
// Read Buffer from IniFile
sprintf(Lng->szTemp, "%s\\%s.xml\0", Lng->szCurrentDir, Lng->szLang);
Lng->XMLParse(Lng->szTemp, Lng->sGradientsText, "Gradients");
SetWindowLongPtr(groupBox, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
OrgGroupBoxProc = (WNDPROC)SetWindowLongPtr(groupBox, GWL_WNDPROC, reinterpret_cast<LONG_PTR>(GroupBoxProc));
int zonenIdx = 0;
char zonename[100];
int xpos, ypos;
int zoneCount = m_pConfig->getZoneCount() + 1;
m_ZoneRadios = new HWND[ zoneCount ];
for(int i=0; i<zoneCount; i++)
m_ZoneRadios[i] = 0;
#define radio_width 60
#define radio_height 20
xpos = 10;
ypos = 12;
RECT rect, rrect;
GetClientRect( groupBox, &rect );
GetWindowRect( groupBox, &rrect );
if(m_pConfig->getZonesTopCount() > 0)
{
int radioWidth = (rect.right - rect.left - 20) / (m_pConfig->getZonesTopCount() + 1);
xpos = 10 + radioWidth - radio_width/2;
for( int zone=0; zone < m_pConfig->getZonesTopCount(); zone++)
{
sprintf( zonename, Lng->sGradientsText[0] + "%d", zonenIdx );
HWND handle = CreateWindow("BUTTON", zonename,
BS_AUTORADIOBUTTON | BS_LEFTTEXT | WS_VISIBLE | WS_TABSTOP | WS_CHILD,
xpos, ypos, radio_width, radio_height, groupBox, NULL, m_hInst, NULL);
SetWindowFont(handle, GetWindowFont(m_hDialog), false);
m_ZoneRadios[ zonenIdx ] = handle;
zonenIdx++;
xpos += radioWidth;
}
}
if( m_pConfig->getZonesLRCount() > 0 )
{
int radioHeight = (rect.bottom - rect.top - 40) / (m_pConfig->getZonesLRCount() + 1);
xpos = rect.right - 10 - radio_width;
ypos = rect.top + 20 + radioHeight - radio_height / 2;
for( int zone=0; zone < m_pConfig->getZonesLRCount(); zone++)
{
sprintf( zonename, Lng->sGradientsText[0] + "%d", zonenIdx );
HWND handle = CreateWindow("BUTTON", zonename,
BS_AUTORADIOBUTTON | BS_LEFTTEXT | WS_VISIBLE | WS_TABSTOP | WS_CHILD,
xpos, ypos, radio_width, radio_height, groupBox, NULL, m_hInst, NULL);
SetWindowFont(handle, GetWindowFont(m_hDialog), false);
m_ZoneRadios[ zonenIdx ] = handle;
zonenIdx++;
ypos += radioHeight;
}
}
if(m_pConfig->getZonesBottomCount() > 0)
{
int radioWidth = (rect.right - rect.left - 20) / (m_pConfig->getZonesBottomCount() + 1);
xpos = rect.right - 10 - radioWidth - radio_width/2 ;
ypos = rect.bottom - 30;
for( int zone=0; zone < m_pConfig->getZonesBottomCount(); zone++)
{
sprintf( zonename, Lng->sGradientsText[0] + "%d", zonenIdx );
HWND handle = CreateWindow("BUTTON", zonename,
BS_AUTORADIOBUTTON | BS_LEFTTEXT | WS_VISIBLE | WS_TABSTOP | WS_CHILD,
xpos, ypos, radio_width, radio_height, groupBox, NULL, m_hInst, NULL);
SetWindowFont(handle, GetWindowFont(m_hDialog), false);
m_ZoneRadios[ zonenIdx ] = handle;
zonenIdx++;
//.........这里部分代码省略.........