I have a class that brings up a window and realises a connection with another computer using CAsyncSocket... After connection I want to destroy that window(implicitly the class) and to copy the connected socket to another class so I can work with it.
For example I use a dialog for simplicity in this example:
---implemantation of some class---
//how do I do this here:
//where socket: is declared as CMyAsyncSocket in this class
//and socketdlg: is declared as CMyAsyncSocket in CMyDialog
---in other function of this class---