Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Simple AES Pin
enhzflep20-Feb-15 1:00
enhzflep20-Feb-15 1:00 
GeneralRe: Simple AES Pin
Member 1065708320-Feb-15 2:05
Member 1065708320-Feb-15 2:05 
QuestionMicrosoft foundation class Pin
Kamlendra Chandra18-Feb-15 0:30
Kamlendra Chandra18-Feb-15 0:30 
AnswerRe: Microsoft foundation class Pin
Jochen Arndt18-Feb-15 1:10
professionalJochen Arndt18-Feb-15 1:10 
GeneralRe: Microsoft foundation class Pin
Kamlendra Chandra22-Feb-15 19:45
Kamlendra Chandra22-Feb-15 19:45 
AnswerRe: Microsoft foundation class Pin
Jochen Arndt22-Feb-15 21:12
professionalJochen Arndt22-Feb-15 21:12 
SuggestionRe: Microsoft foundation class Pin
Richard MacCutchan18-Feb-15 5:32
mveRichard MacCutchan18-Feb-15 5:32 
QuestionI want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Shibu Krishnan17-Feb-15 14:09
Shibu Krishnan17-Feb-15 14:09 
I have some structures in my application (which is pretty big). To test certain error conditions, I have to input wrong values to these variables and send across another system (using udp sockets). How can I use the treeview to populate all the structures and upon user selection of one of the node (the struct variable), i wants to input error values and update the same structure variable in my app. Here is the sample

Quote:
hRoot = m_TreeView.InsertItem(_T("Messages"), 0, 1);
hMainMsg = m_TreeView.InsertItem("XXXXX", 0, 1, hRoot);

hSubMsg = m_TreeView.InsertItem("MsgHdr", 2, 3, hMainMsg);
m_TreeView.InsertItem(_T("msgId"), 4, 5, hSubMsg);
m_TreeView.InsertItem(_T("InfId"), 4, 5, hSubMsg);
m_TreeView.InsertItem(_T("Seq No"), 4, 5, hSubMsg);
m_TreeView.InsertItem(_T("msgLen"), 4, 5, hSubMsg);
m_TreeView.InsertItem(_T("timeStamp"), 4, 5, hSubMsg);


in double click event,

HTREEITEM nodSelected = m_TreeView.GetSelectedItem();	
	CString strSelected = m_TreeView.GetItemText(nodSelected);
	 
	
	HTREEITEM hParent = nodSelected;
	
	while (hParent = m_TreeView.GetParentItem(hParent))
	{
		
		CString strParent    = m_TreeView.GetItemText(hParent);
		
		if (strcmp(strParent,"Messages")==0)
			break;

		m_TreeView.SetItemState(hParent, TVIS_BOLD, TVIS_BOLD);		

		strSelected = strParent + "." + strSelected;
	}

	m_txtMsg = strSelected + "=";


for ex. m_txtMsg will be now "XXXXX.msgHdr.msgId=<some value="">"

Is there any way to use this text data to assign as my variable

Please help.
AnswerRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Richard MacCutchan17-Feb-15 22:42
mveRichard MacCutchan17-Feb-15 22:42 
GeneralRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Shibu Krishnan19-Feb-15 14:09
Shibu Krishnan19-Feb-15 14:09 
GeneralRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Richard MacCutchan19-Feb-15 21:12
mveRichard MacCutchan19-Feb-15 21:12 
GeneralRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Shibu Krishnan21-Feb-15 2:22
Shibu Krishnan21-Feb-15 2:22 
GeneralRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Richard MacCutchan21-Feb-15 2:51
mveRichard MacCutchan21-Feb-15 2:51 
GeneralRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Shibu Krishnan22-Feb-15 7:04
Shibu Krishnan22-Feb-15 7:04 
GeneralRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Richard MacCutchan22-Feb-15 7:17
mveRichard MacCutchan22-Feb-15 7:17 
QuestionRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Shibu Krishnan22-Feb-15 7:36
Shibu Krishnan22-Feb-15 7:36 
AnswerRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Richard MacCutchan22-Feb-15 7:48
mveRichard MacCutchan22-Feb-15 7:48 
GeneralRe: I want to create a treeview with my structure/class variable as nodes and update the same with custom values Pin
Shibu Krishnan22-Feb-15 8:01
Shibu Krishnan22-Feb-15 8:01 
QuestionConst VS Defines Pin
chaq68616-Feb-15 15:00
professionalchaq68616-Feb-15 15:00 
GeneralRe: Const VS Defines Pin
PIEBALDconsult16-Feb-15 16:26
mvePIEBALDconsult16-Feb-15 16:26 
GeneralRe: Const VS Defines Pin
chaq68616-Feb-15 17:46
professionalchaq68616-Feb-15 17:46 
GeneralRe: Const VS Defines Pin
Peter_in_278016-Feb-15 18:52
professionalPeter_in_278016-Feb-15 18:52 
AnswerRe: Const VS Defines Pin
Freak3016-Feb-15 21:43
Freak3016-Feb-15 21:43 
QuestionMessage Closed Pin
16-Feb-15 22:10
mveCPallini16-Feb-15 22:10 
AnswerMessage Closed Pin
16-Feb-15 22:52
professionalOrjan Westin16-Feb-15 22:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.