|
|
Since you mention values and not value, I am presuming that you are looking for multiple selected items, so I would recommend using CListCtrl::GetFirstSelectedItemPosition(...) and CListCtrl::GetNextSelectedItem(...) .
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
i mean a single value.i am selecting a single value & i want the exact position of that item in the list
Thanks in Advance
|
|
|
|
|
Whitesky's approach is more direct and will work well, but note that my above will also work for single selected items (or for nothing selected as well).
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Your answer is perfect.
|
|
|
|
|
On a button press in dialog i am Creating a thread by the statement
pTh = new CMyThread;
Where CMyThread is CWinThread derived class and pTh is declared in the MyDialg.h as
CMyThread *pTh
Even though i close the dialog can my thread run without any issues. Are there any points that i should note in this senario.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
jup, the Thread is still alive
you should kill him in the OnClose-Method via pTh->PostThreadMessage(WM_QUIT);
|
|
|
|
|
The thread will copy some files from one location to another. It will automatically end when its done.
My question is
Does the thread complete its work eventhough i close my dialog.
KIRAN PINJARLA
|
|
|
|
|
I'm not an expert, but i think yes
But you can test it via OutputDebugMessage("STILL ALIVE");
Then you give your thread a hard work and close directly the dialog.
Propably the debugger kills the thread for you.
|
|
|
|
|
kiran.pinjarla wrote: Even though i close the dialog can my thread run without any issues.
Yes, your thread runs independantly of the dialog box.
kiran.pinjarla wrote: Are there any points that i should note in this senario.
You should make sure that all threads have ended before the application terminates. It's considered good practice.
Read here[^] and here[^] for information about how to accomplish this.
Usually you would like your main thread to know when your secondary thread has finished its work and I suggest you post a user defined message to do that.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
How can i get sharing properties of a file/folder ?
There are inodes in unix fs , what matches inodes in NTFS , and which system calls should i use to get
inode number of a file/folder ?
Thank you very much.
|
|
|
|
|
check GetNativeSystemInfo()
nave
|
|
|
|
|
|
Akin Ocal wrote: There are inodes in unix fs , what matches inodes in NTFS , and which system calls should i use to get
inode number of a file/folder ?
Given that an inode stores, among other things, information such as user and group ownership, look at GetFileSecurity() and GetNamedSecurityInfo() . An inode also stores a file's attributes, so check out GetFileAttributes() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
S.V.RAJKUMAR wrote: I need to call that method or function by multithreadingly?
Why?
S.V.RAJKUMAR wrote: In VB, What is the Method to call this function multitaskingly?
VB6 doesn't allow multithreading.
VB.NET allows it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
What the meaning of "multithreadingly"?
|
|
|
|
|
S.V.RAJKUMAR wrote: In VB, What is the Method to call this function
"How do I call a function from within VB code?" is a VB question. In any case, you'll need something like:
Private Declare Function Add Lib "mydll" (ByVal x as Integer, ByVal y As Integer) As Integer
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
S.V.RAJKUMAR wrote: How to Invoke Multithreading in VB.
I guess you would create additional threads via CreateThread() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all:
In C: when a program terminates correctly, we write
return EXIT_SUCCESS; otherwise
return EXIT_FAILURE;
How about C++, I know in C++ EXIT_SUCCESS and EXIT_FAILURE are not defined. Is there any programming convention I should follow apart from writing plain:
return 0; or
return 1;
Thank you
|
|
|
|
|
C_Zealot wrote: EXIT_SUCCESS
Never seen that before...
I would just return 1 or 0, but you can #define them any way you like.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
|
What a program returns (to the calling process) is independent of the language used.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|