Click here to Skip to main content
15,894,405 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: looking for a Grid Control Pin
ddmcr10-Jan-06 0:05
ddmcr10-Jan-06 0:05 
GeneralRe: looking for a Grid Control Pin
toxcct10-Jan-06 0:10
toxcct10-Jan-06 0:10 
AnswerRe: looking for a Grid Control Pin
Cedric Moonen10-Jan-06 0:07
Cedric Moonen10-Jan-06 0:07 
GeneralRe: looking for a Grid Control Pin
toxcct10-Jan-06 0:09
toxcct10-Jan-06 0:09 
GeneralRe: looking for a Grid Control Pin
ThatsAlok10-Jan-06 0:17
ThatsAlok10-Jan-06 0:17 
GeneralRe: looking for a Grid Control Pin
Rage10-Jan-06 0:22
professionalRage10-Jan-06 0:22 
GeneralRe: looking for a Grid Control Pin
ThatsAlok10-Jan-06 0:35
ThatsAlok10-Jan-06 0:35 
GeneralRe: looking for a Grid Control Pin
toxcct10-Jan-06 0:26
toxcct10-Jan-06 0:26 
GeneralRe: looking for a Grid Control Pin
ThatsAlok10-Jan-06 0:41
ThatsAlok10-Jan-06 0:41 
GeneralRe: looking for a Grid Control Pin
Cedric Moonen10-Jan-06 0:49
Cedric Moonen10-Jan-06 0:49 
GeneralRe: looking for a Grid Control Pin
ThatsAlok10-Jan-06 1:02
ThatsAlok10-Jan-06 1:02 
GeneralRe: looking for a Grid Control Pin
#realJSOP10-Jan-06 2:05
mve#realJSOP10-Jan-06 2:05 
QuestionDLL loading problem Pin
kil ramesh9-Jan-06 23:39
kil ramesh9-Jan-06 23:39 
AnswerRe: DLL loading problem Pin
ThatsAlok10-Jan-06 0:27
ThatsAlok10-Jan-06 0:27 
AnswerRe: DLL loading problem Pin
toxcct10-Jan-06 0:31
toxcct10-Jan-06 0:31 
QuestionCustomizing Insert File and Insert Hyperlink dialogs Pin
Anil_vvs9-Jan-06 23:25
Anil_vvs9-Jan-06 23:25 
Questionhow to check Presence of USB drive Pin
birajendu9-Jan-06 22:53
birajendu9-Jan-06 22:53 
AnswerRe: how to check Presence of USB drive Pin
#realJSOP9-Jan-06 23:36
mve#realJSOP9-Jan-06 23:36 
GeneralRe: how to check Presence of USB drive Pin
birajendu9-Jan-06 23:48
birajendu9-Jan-06 23:48 
AnswerRe: how to check Presence of USB drive Pin
kakan10-Jan-06 0:21
professionalkakan10-Jan-06 0:21 
AnswerRe: how to check Presence of USB drive Pin
David Crow10-Jan-06 2:44
David Crow10-Jan-06 2:44 
QuestionFill CTreeCtrl from TreadFunction? Pin
bosfan9-Jan-06 22:51
bosfan9-Jan-06 22:51 
Hello community,
does any one know how to fill CTreeCtrl from a ThreadFunction in two steps???

First step is when the root item is fill, and the next is when the child item is fill!
I try with this:
<br />
// Globalvarable HTREEITEM hTreeItem to save the Filenames for Rootitems<br />
HTREEITEM hTreeItem;<br />
// i'm in the ThreadFunktion:<br />
// i read data from a file, first rootitem is the name of the file! <br />
// call this function with ::SendMessage() -> LRESULT CForeCheckDlg::OnFillTree(WPARAM wParam, LPARAM lParam)<br />
::SendMessage(AfxGetApp()->GetMainWnd()->m_hWnd, WM_FILL_TREE, 0, (LPARAM&) csFileName);<br />
<br />
// and the childitems r the lines from the file<br />
/*<br />
+FileName1(root) // to fill the root items is not a problem, but thems child's<br />
 Line1(Child)<br />
 Line2(Child)<br />
+FileName2(root)<br />
 Line1(Child)<br />
 Line2(Child)<br />
...<br />
...<br />
now in loop i read the lines and want to fill them in the tree? :confused:<br />
and every Line i send again with SendMessage() to the CTreeCtrl<br />
*/<br />
// ChildItem:<br />
::SendMessage(AfxGetApp()->GetMainWnd()->m_hWnd, WM_FILL_CHILD_TREE, (WPARAM&) hTreeItem, (LPARAM&) csTemp);<br />
// The Function to fill CTreeCtrl RootItem:<br />
<br />
LRESULT CForeCheckDlg::OnFillTree(WPARAM wParam, LPARAM lParam)<br />
{<br />
	EnterCriticalSection(&m_CritSect);<br />
	CString csUrl;<br />
	csUrl = (CString&) lParam;<br />
        // pointer to my CTreeCtrl, is in a TabControl!<br />
	CTreeCtrl* cTree = (CTreeCtrl*) ((CWeb*)m_cTabAll.GetTab(6))->GetDlgItem(IDC_TREE1);<br />
	<br />
	hTreeItem = cTree->InsertItem(csUrl,0,0); // insert the Rootitem, as Filename, works!!<br />
	LeaveCriticalSection(&m_CritSect);<br />
	return 0;<br />
}<br />
// now is problem, how to fill the childitems to hims parentitem, childitem's r the lines from the file?? :confused:<br />
// The Function to fill CTreeCtrl ChildItem:<br />
<br />
LRESULT CForeCheckDlg::OnFillChildTree(WPARAM wParam, LPARAM lParam)<br />
{<br />
<br />
	EnterCriticalSection(&m_CritSect);<br />
	<br />
        // pointer to my CTreeCtrl, is in a TabControl!<br />
	CTreeCtrl* cTree = (CTreeCtrl*) ((CWeb*)m_cTabAll.GetTab(6))->GetDlgItem(IDC_TREE1);<br />
	HTREEITEM hParent;<br />
	hParent = (HTREEITEM&)wParam;<br />
	CString csUrl;<br />
	csUrl = (CString&) lParam; // csUrl is a Line from a File<br />
	<br />
	cTree->InsertItem(csUrl, 0, 0, hParent); <br />
	<br />
	LeaveCriticalSection(&m_CritSect);<br />
<br />
	return 0;<br />
}<br />
<br />

The Childitems ar insert, but to wrong Roots!
Thanx for any help!


with best regards
break;
QuestionFAR Pin
Smith#9-Jan-06 22:48
Smith#9-Jan-06 22:48 
AnswerRe: FAR Pin
toxcct9-Jan-06 23:00
toxcct9-Jan-06 23:00 
GeneralRe: FAR Pin
Smith#10-Jan-06 1:01
Smith#10-Jan-06 1:01 

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.