Quote Originally Posted by Richard.J View Post
yes, as the first option you have.
it did not solve my problem. i still can not acces variable socket in OnButtonStart()

Quote Originally Posted by Richard.J View Post
Well, the OnButtonStart does not do much more than check if the port is empty, then create the socket, bind it and set it to listen mode. The thread does nothing more than accept an incoming connection, add it to some management data and terminates.
You could move the creation of the socket from OnButtonStart to the thread and handle the incoming connection there (at the moment, you can only accept one single connection). If you need the management data inside the CComputer class, you can still pass the this-pointer (or better, a window handle) to the thread and let the thread post messages to the dialog whenever a new connection is established. If you want to be able to accept more than one connection, you need to wrap a loop around your "accept" part inside the thread.

Does that help?
that help me. but i still don't really understand if without example. would you like to give it??

how about pointer "this " like you said before?? i still can not use that to acces variable value...