?
Solved

C++ Child Windows?

Posted on 2003-03-14
1
Medium Priority
?
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 40

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

765 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