Solved

No of files currently open

Posted on 2000-04-07
1
190 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_
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now