Solved

No of files currently open

Posted on 2000-04-07
1
206 Views
Last Modified: 2010-04-10
Does anyone know how to determine the number of occurences of a single MDI child form in Borland C++ Builder 3.0

Any help much appreciated.
0
Comment
Question by:Elmo_
[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 1

Accepted Solution

by:
jbodom earned 25 total points
ID: 2695666
The property MDIChildCount will give you the number of occurrences of children.  This is assuming that you've correctly made the parent form property FormStyle fsMDIForm.  Here's some example code that closes all the MDI children of Form1.

void __fastcall TForm1::Button1Click(TObject *Sender)

{
  for(int i = 0; i < MDIChildCount; i++)
    MDIChildren[i]->Close();
}
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

717 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