|
NO!!! Write "CWinThread" in the Search Box up von den CP-Website and look yourself. I you want to learn programming you gotta learn this.
Greetings from Germany
|
|
|
|
|
Nice idea.....i did man.....but i don want bulitin function..i want to implemnt my own function..n how can i do this?
thx
NooR
|
|
|
|
|
Noor Akhter wrote:
Nice idea.....i did man.....but i don want bulitin function..i want to implemnt my own function..n how can i do this?
you want to create you own threading function... is that right!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
yup i want to create my own threads...n i cal the local function in it....is it possible? do reply//////
NooR
|
|
|
|
|
|
See here and here.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i don want dis....how to initialses and create the threads...can u provide me some examples at beg level?
Thx
NooR
|
|
|
|
|
I think a good and easy example is in MSDN Here[^]
whitesky
|
|
|
|
|
can v call local function in the thread..if it possible its not runing in my program..now wat to do?
NooR
|
|
|
|
|
I hope this helpful for you
HANDLE thread;
<br />
void CYourClass::Runthread()<br />
{<br />
DWORD ThreadID;<br />
thread=CreateThread(NULL,0,ThreadFunc,this,0,&ThreadID);<br />
}<br />
<br />
void ThreadFunc( LPVOID lpv )<br />
{<br />
CYourClass* m_Class = (CYourClass*) lpv;<br />
m_Class->Function();<br />
}<br />
<br />
void CYourClass::Function()<br />
{<br />
MessageBox("Test");<br />
}<br />
whitesky
|
|
|
|
|
The two articles I provided are at the elementary level. What part is troubling you? Threads are usually not something to be tackled by a beginner.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi can any1 give some info regarding multithreading in VC++. any application...............
When the goin gets tough then tough gets going
|
|
|
|
|
|
can u tell me about createthread method
When the goin gets tough then tough gets going
|
|
|
|
|
From the MSDN
<br />
The CreateThread function creates a thread to execute within the virtual address space of the calling process.<br />
whitesky
|
|
|
|
|
ooola rocks wrote:
can u tell me about createthread method
MSDN Library is your friend Man.. Just Type the Api... you will know every thing about it
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
how can i get the current selected item from listcontrol.
thanx
|
|
|
|
|
|
hi
thanx but i want the text not the position of selected item.
how can i get it.
thanx
|
|
|
|
|
|
hi
thanx
i hav tried like this
Position pos = m_listctrl.GetFirstSelectedItemPosition();
str = m_listctrl.GetItemText(pos,1);
then it gives me error
error C2664: 'CString CListCtrl::GetItemText(int,int) const' : cannot convert parameter 1 from 'POSITION' to 'int'
how to get the current index in int format.
thanx
|
|
|
|
|
You have to use GetNextSelectedItem(Pos)to get the item index, this will return the item index as 'int', use this 'int' value in GetItemText() and assign 0(zero) to subitem if you are not using the ListCtrl in Report View
|
|
|
|
|
You have to use GetNextSelectedItem()to get the item index, this will return the item index as 'int', use this 'int' value in GetItemText() and assign 0(zero) to subitem if you are not using the ListCtrl in Report View
|
|
|
|
|
hi thanx
its working now but there is a problem..
i get the seleted string into the String variable and displaying the it in the MessageBox().
what is happing when i click on any item it shows the text but it shows the messagebox three time.
why is this happening.......plz tell me
thanx
|
|
|
|
|
aavesh wrote: what is happing when i click on any item it shows the text but it shows the messagebox three time.
It sounds as though you are responding to the LVN_ITEMCHANGED message. When you select an item, more than one item has changed at that point. Study the NMLISTVIEW structure for details.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|