Click to See Complete Forum and Search --> : RE: GUI and sockets


jom20
August 15th, 2003, 08:40 AM
Hello,

I am trying to program in Visual C++ .NET using the studio software. I used to program in C++ however I was using C++ Builder by borland. In that software the components were readily available and therefore I didn't have to do much in terms of creating them as I did in Java. The problem I am having with Visual C++ is that I dont understand how to create the components using the language. I found that when I create with dialog boxes, when I run the application it doesn't appear, because for some reason its modal and I have no idea how to make it appear on the screen.

The second problem I am having is writing the code to connect to the socket using the winsock library. Any ideas????

Thanks
Trisha

Grim
August 15th, 2003, 09:07 AM
I would suggest reading the online tutorials for dialogs. They explain well how to get started.

Basically, you define a dialog class

CMyDialog dlg;

To display it in modal mode:

dlg.DoModal(); // code waits here for dlg to exit.

to check for return value:

int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// user clicked OK button
}

Andreas Masur
August 15th, 2003, 11:26 AM
[Moved thread]

jom20
August 17th, 2003, 09:12 AM
Helo,

Thanks for that I will try it, do you have any ideas about the sockets?

Thanks

Andreas Masur
August 17th, 2003, 09:45 AM
Take a look at the network and/or internet section here at CodeGuru (http://www.codeguru.com). There are several examples of socket applications - most of them including source code...

jom20
August 17th, 2003, 01:44 PM
Thanks I will do that.

Trisha