?
Solved

C++ Child Windows?

Posted on 2003-03-14
1
Medium Priority
?
243 Views
Last Modified: 2006-11-17
Hello,
I'm a relative noob to c++, but I have a basic grounding in the language.
I am trying to develop a small chat program and I want to have my program open two child windows.
One for user input, and one that displays the content of a text file (refreshing periodically)
I have no idea how to open child windows or how they work.
I am NOT USING VISUAL C++. I'm using Turbo C++ 4.5 by Borland.
Thanks in advance,
Adam

p.s. Please include what header files I need or if I have to write my own, what they have to do.
0
Comment
Question by:aj72886
1 Comment
 
LVL 41

Accepted Solution

by:
Kyle Abrahams earned 300 total points
ID: 8141079
void thread_routine(); // prototype


void main()
{
  if(_beginthread( thread_routine, 0, NULL )==-1)
        {  
                printf("Error in creating thread\n");
                exit(0);
        }
      else
        {
          // parent code
        }
}

void thread_routine()
{
 //child code here
}

This will allow you to execute 2 codes at once.  Or you may want to try:
ShellExecute ( NULL, "open", TEXT("myexe.exe"),
                NULL, NULL, SW_SHOW);

That will create a new process and pop up it's own window.
You should be able to communicate through sockets.  As for libraries:

#include <process>
#include <conio>
#include <dos>
#include <windows>
#include <io>

That should do it for you.

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question