Jump to content

  • Log In with Google      Sign In   
  • Create Account


Couple of quick questions


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 27 September 1999 - 01:14 PM

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


Sponsor:

#2 Dave Astle   Senior Staff   -  Reputation: 2305

Like
Likes
Like

Posted 27 September 1999 - 04:28 AM

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.

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 27 September 1999 - 12:54 PM

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?


#4 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 27 September 1999 - 01:14 PM

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, =)





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS