Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: FAR Pin
toxcct10-Jan-06 1:02
toxcct10-Jan-06 1:02 
AnswerRe: FAR Pin
Bob Stanneveld10-Jan-06 0:02
Bob Stanneveld10-Jan-06 0:02 
GeneralRe: FAR Pin
Smith#10-Jan-06 1:00
Smith#10-Jan-06 1:00 
GeneralRe: FAR Pin
Prakash Nadar10-Jan-06 1:20
Prakash Nadar10-Jan-06 1:20 
GeneralRe: FAR Pin
Bob Stanneveld10-Jan-06 2:24
Bob Stanneveld10-Jan-06 2:24 
QuestionMDI application Pin
Anu_Bala9-Jan-06 22:41
Anu_Bala9-Jan-06 22:41 
AnswerRe: MDI application Pin
_anil_9-Jan-06 22:50
_anil_9-Jan-06 22:50 
AnswerRe: MDI application Pin
toxcct9-Jan-06 22:51
toxcct9-Jan-06 22:51 
GeneralRe: MDI application Pin
Rage10-Jan-06 0:21
professionalRage10-Jan-06 0:21 
GeneralRe: MDI application Pin
toxcct10-Jan-06 0:26
toxcct10-Jan-06 0:26 
GeneralOT... Pin
toxcct10-Jan-06 4:28
toxcct10-Jan-06 4:28 
AnswerRe: MDI application Pin
Yuwraj9-Jan-06 22:56
Yuwraj9-Jan-06 22:56 
AnswerRe: MDI application Pin
Curtis Schlak.10-Jan-06 4:15
Curtis Schlak.10-Jan-06 4:15 
QuestionI got following error while compiling.... Pin
Yuwraj9-Jan-06 22:19
Yuwraj9-Jan-06 22:19 

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.