you need to use a rich edit control, which is an extension to the edit control. This is the control that you get in wordpad.
If you are using MFC there is a class CRichEdit[^].
This can mostly be used like a standard edit control, however yo set or get the text you need to use streaming functions otherwise the markup will show as plain text.
see CRichEditCtrl::StreamIn[^] for setting the text and CRichEditCtrl::StreamOut[^] for reading text with its formatting tags
An alternate would be a html control. There are quite a few articles on codeproject with samples.
It depends of course on the goal of your program, but 100,000 items seems an excessive amount; the most notable speed improvement would come from not adding so many items. If this were possible, it would also speed things up later when you're scrolling the view, selecting items, deleting selections etc.
Maybe it would be useful to add some filter functionality, this would both help the loading time and help the user find what he wants more easily.
If a process creats a threads and then detaches that thread.
I have no idea what this means.
Now If I kill my process then in this case will my thread run upto its completion ?
If it is a native application, then every other thread created within the application will be killed abruptly when the main thread comes to a halt. If you want a graceful exit, you need to take care of that yourself.
UINT AdditionalThread(LPVOID p)
// do stuff (assume that this takes 10 seconds)return0;
_beginthread(AdditionalThread, 0, 0);
//do stuff (assume this takes 3 seconds)//write code to wait for AdditionalThread to complete, or it will be killedreturn0;
Threads can not be detatched from the containing process. A process provides the context the threads runs in (such as the address space) and it doesn't really even make sense to consider a thread without one.
As others have correctly pointed out, user mode threads always runs in the context of its process and cannot be detached.
However you can create a kernel mode thread using PsCreateSystemThread[^] which does not run in any process context.
But you can only call this routine from driver code.
«_Superman_» I love work. It gives me something to do between weekends.