Hi, please have a look at the attachment, it is a sample from the book Teach Yourself VC++ in 21 days, which is a dialog based application and has both client and server functionality in the same dialog resource. It has a function called SetParent, and a member variable of the type CDialog* as its parameter.
I need to make a similar application, but I wish to incorporate the client and the server independently, and also, as SDI or MDI applications, instead of dialog based. I tried to use similar approach as in this example, and seperated client and server functionalities into two different applications, but I get a huge number of errors.
The following are the changes I made
Instead of the CDialog* varialbe type, I used a CFormview* variable,as it is an SDI application.
I used the SetParent function with this variable as the parameter.
Where am I doing wrong here? I am unable to figure it out. Please help.
Last edited by ur_unholyness; March 8th, 2005 at 02:04 AM.
Thank you Mr. Ejaz, I will post it there again, but it would be a great help if you could help me with two answers :
In the sample I uploaded, since it is a dialog based one, it uses the CDialog* variable in the SetParent function. If I were to use most of the same code as in the sample, but in an MDI based application, what do I substitute this CDialog* variable with?.
I guess the SetParent function is used to attach the WinSock functionalities to a view, so if one of the views in my MDI application needs network functionalities, how do I attach them to it using this CMySocket class.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.