Ejemplo n.º 1
0
void dlg_girls::set_edits(girl_info* info)
{
	SetDlgItemText(IDC_EDIT_CARD, Utf8ToGBK(info->card_.c_str()));
	SetDlgItemText(IDC_EDIT_NAME, Utf8ToGBK(info->name_.c_str()));
	SetDlgItemText(IDC_EDIT_ADDR, Utf8ToGBK(info->addr_.c_str()));
	SetDlgItemText(IDC_EDIT_PHONE_NUMBER, Utf8ToGBK(info->phone_number_.c_str()));
	SetDlgItemText(IDC_EDIT_BANK_CARD, Utf8ToGBK(info->bank_card_.c_str()));
	SetDlgItemInt(IDC_EDIT_SCORE, info->score_);
	SetDlgItemInt(IDC_EDIT_PERFORMANCE, info->performance_);
	SetDlgItemInt(IDC_EDIT_BONUS, info->bonus_);
}
Ejemplo n.º 2
0
void xstring_utf8_to_gbk(XScriptVM* vm)
{
	CheckParam(string.utf8togbk, 0, value, OP_TYPE_STRING);

	char* result = Utf8ToGBK(stringRawValue(&value));
	vm->setReturnAsStr(result);
	delete[] result;
	
}
Ejemplo n.º 3
0
/*
装载页面
*/
void CPageContainerWnd::LoadPage(CString sPageXMLFile)
{
	pugi::xml_document doc;

	if (!doc.load_file(sPageXMLFile))
	{
		return;
	}


	pugi::xpath_node_set nodes = doc.select_nodes("/pages/page");
	
	

	for (pugi::xpath_node_set::const_iterator it = nodes.begin(); it != nodes.end(); ++it)
	{
		pugi::xpath_node node = *it;

		
		CPageInfo pageInfo;

		std::string title = node.node().child_value("title");
		std::string caption = Utf8ToGBK(title);
		//USES_CONVERSION;
		//CString temp = A2W(title);

		std::string xmlfile = node.node().child_value("xmlfile");
		
		pageInfo.m_sPageCaption = caption.c_str();
		pageInfo.m_sPageFile = xmlfile.c_str();
		pageInfo.m_pPageWnd = NULL;

		m_vPages.push_back(pageInfo);		
	}
	
	int size = m_vPages.size();

	for (std::vector<CPageInfo>::iterator it = m_vPages.begin(); it != m_vPages.end(); it++)
	{
		CPageInfo& page = *it;
		
		m_wndPageNav.AddPage(page.m_sPageCaption);
	}
	
	// 默认打开第一个页面
	OpenPage();
}