Beispiel #1
0
static void ShowTagsProperties()
{
	TVITEM tvi;
	ZeroMemory(&tvi, sizeof(TVITEM));

	tvi.hItem = (HTREEITEM) TreeView_GetSelection(g_hTree);
	tvi.mask = TVIF_PARAM;
	int err = TreeView_GetItem(g_hTree, &tvi);

	if (tvi.lParam != NULL)
	{
		TreeBuilder* builder = (TreeBuilder*) tvi.lParam;
		Tag* tag = builder->GetTag();
		if (tag != NULL)
		{
			std::string str = "Tag Name: " + tag->getFullTag();
			str += "\r\nLanguage: " + tag->getLanguage();
			str += "\r\nType: " + tag->getType();
			str += "\r\nFile: " + tag->getFile();
			if (tag->getMemberOf().length() != 0)
				str += "\r\nMember of: " + tag->getMemberOf();
			if (tag->getDetails().length() != 0)
				str += "\r\nDetails: " + tag->getDetails();
			MsgBox(str.c_str());
		}
	}
}