Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Couple of quick questions

This topic is 7023 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If you are using MFC, it's quite easy. Just create a new dialog, attach a class to it using the ClassWizard, and then in OnButton1, you'd declare an instance of the new dialog (you may want to make it a member variable of the parent dialog), and call its DoModal() method.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I've tried using the following code, which always worked on SDI apps.

CTestDlg dlg;
dlg.DoModal();

but for some reason I get a whole bunch of compiler errors. Do I need to change this code since I'm doing a dialog based app instead of an SDI app now?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
OOPS, hehe well I figured out what I was doing wrong on the Do.Modal part, I still need help with the winsock functions though, thanks.

PS I forgot to put the "testdlg.h" #include at the top of the code, =)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I have a couple of quick questions on things I couldn't seem to get to work.

1. What is the code to put in to open another dialog box?
I have a main dialog and a button that I want to open another dialog box, not an AFX message box. I know where to put the code in
::OnButton1
but I don't know what code to put in.

2. How do I get people's IP addresses out of a game? I have seen IP sniffers but I don't know how to do it myself. Then once I have these addresses, I need to know the function calls to send variables to their comp. I've been looking for this one for a long time. All I need is to send variables x and y to the other comp, and then when they are received that persons program reacts based on their values!
THANKS IN ADVANCE!!!!!

Lord_MiL

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!