Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: decision tree Pin
jeron119-Feb-15 7:34
jeron119-Feb-15 7:34 
QuestionRe: decision tree Pin
David Crow19-Feb-15 8:52
David Crow19-Feb-15 8:52 
QuestionSimple AES Pin
Member 1065708319-Feb-15 3:46
Member 1065708319-Feb-15 3:46 
AnswerRe: Simple AES Pin
jeron119-Feb-15 4:22
jeron119-Feb-15 4:22 
GeneralRe: Simple AES Pin
Member 1065708319-Feb-15 14:37
Member 1065708319-Feb-15 14:37 
GeneralRe: Simple AES Pin
enhzflep19-Feb-15 17:53
enhzflep19-Feb-15 17:53 
GeneralRe: Simple AES Pin
Member 1065708319-Feb-15 18:25
Member 1065708319-Feb-15 18:25 
GeneralRe: Simple AES Pin
enhzflep19-Feb-15 18:29
enhzflep19-Feb-15 18:29 
GeneralRe: Simple AES Pin
Member 1065708319-Feb-15 20:38
Member 1065708319-Feb-15 20:38 
GeneralRe: Simple AES Pin
enhzflep19-Feb-15 20:52
enhzflep19-Feb-15 20:52 
GeneralRe: Simple AES Pin
Member 1065708319-Feb-15 23:21
Member 1065708319-Feb-15 23:21 
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 

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.