コード例 #1
0
ファイル: win32ctrlTree.cpp プロジェクト: kenkuang/pywin32
// @pymethod int|PyCTreeCtrl|SetItemText|Changes the text of a list view item or subitem.
PyObject *PyCTreeCtrl_SetItemText( PyObject *self, PyObject *args )
{
	CTreeCtrl *pList = GetTreeCtrl(self);
	if (!pList) return NULL;
	PyObject *obItem;
	TCHAR *text;
	PyObject *obtext;
	if (!PyArg_ParseTuple( args, "OO:SetItemText", 
	                   &obItem, // @pyparm HTREEITEM|item||The item whose text is to be retrieved.
					   &obtext)) // @pyparm string|text||String that contains the new item text.

		return NULL;
	HTREEITEM item;
	if (!PyWinObject_AsHANDLE(obItem, (HANDLE *)&item))
		return NULL;
	if (!PyWinObject_AsTCHAR(obtext, &text, FALSE))
		return NULL;
 	GUI_BGN_SAVE;
	BOOL ok = pList->SetItemText(item, text);
 	GUI_END_SAVE;
	PyWinObject_FreeTCHAR(text);
	if (!ok)
		RETURN_ERR("SetItemText failed");
	RETURN_NONE;
}
コード例 #2
0
ファイル: PreferencesDlg.cpp プロジェクト: brolee/EMule-GIFC
void CPreferencesDlg::Localize()
{
	SetTitle(RemoveAmbersand(GetResString(IDS_EM_PREFS))); 

	m_wndGeneral.Localize();
	m_wndDisplay.Localize();
	m_wndConnection.Localize();
	m_wndServer.Localize();
	m_wndDirectories.Localize();
	m_wndFiles.Localize();
	m_wndStats.Localize();
	m_wndNotify.Localize();
	m_wndIRC.Localize();
	m_wndSecurity.Localize();
	m_wndTweaks.Localize();
	m_wndWebServer.Localize();
	m_wndScheduler.Localize();
	m_wndProxy.Localize();
	m_wndMessages.Localize();
	m_wndXtreme.Localize(); //Xman Xtreme Mod
	m_wndXtreme2.Localize(); //Xman Xtreme Mod
	m_wndScar.Localize(); // ScarAngel Preferences window - Stulle

	int c = 0;

	CTreeCtrl* pTree = GetPageTreeControl();
	if (pTree)
	{
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_GENERAL)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_DISPLAY))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_CONNECTION))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_PROXY))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_SERVER))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_DIR))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_FILES))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_EKDEV_OPTIONS))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_STATSSETUPINFO))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_IRC)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_MESSAGESCOMMENTS)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SECURITY))); 
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SCHEDULER)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_WS)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_TWEAK)));
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_XTREMESETTINGS)) + _T(" I")); //Xman Xtreme Mod
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_XTREMESETTINGS)) + _T(" II")); //Xman Xtreme Mod
		pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SCARANGEL))); // ScarAngel Preferences window - Stulle
	#if defined(_DEBUG) || defined(USE_DEBUG_DEVICE)
		pTree->SetItemText(GetPageTreeItem(c++), _T("Debug"));
	#endif
	}

	//Xman Preferences Banner
	m_banner.UpdateSize();
	//Xman end

	UpdateCaption();
}