473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Program Structure

I have an MDI application that can have many child windows, although each
"document" does not nececarily just have one window. There are a few issues
that I have.

I want multi-threading abilities. Controls have to be created and run by the
main thread.
I have other threads running that need to be able to create "documents" that
may have multiple windows.

To do this i have a "singleton" window manager class that, after being
launched and initiated by the main form, records the opeining of documents
and the visibility of windows, and can be accessed from any thread and will
invoke window creation on the main thread.

Problems :
Window manager class -
Owns the parent form and can cause it to open new forms.
Is this the best way to deal with window creation via multiple threads (e.g.
a TCP/IP connection requesting window opening) ?

Window closure -
I want to be able to "hide" windows in the MDI area when they are asked to
close, and not dispose() them. These need to be able to be reopened. The way
i have implemented this is to override the onclose() method and call hide()
if a global static bool "appIsClosing" is not set to true.
The problem is that the framework seems to call the onclosing method of the
MDI children before the parent, so i effectively have to tell the app to
close twice for this to work, once to set the bool to true, and then again
to perform the close(). How do i make children hide() and not
close()/dispose() if the main app isnt exiting ?

Layout -
what is the best way of ordering created windows in a user friendly way ?
Manybe dependent of windows already created.

Many thanks for anyones comments
Jon Rea
Student
Nov 15 '05 #1
0 1025

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Randy Yates | last post by:
Hi, I work in an embedded environment in which we often use a mix of C and assembly code. Thus a recurring requirement is to be able to take a C header file with structure definitions as input...
1
by: Robert S | last post by:
Hello group Since I want to modify a large program written in C(40K line) for the academic purposes and the program consists of several modules, it is necessary to have software structure in order...
6
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". The program is a MDI app with threading for...
3
by: Aleramo | last post by:
Can someone understand my errors in this program? in particular the reason cos i receive the worning message. /* Questo programma riguarda il calcolo del mutuo accoppiamento fra patch dell'array....
7
by: Jake Thompson | last post by:
Hello I created a DLL that has a function that is called from my main c program. In my exe I first get a a pointer to the address of the function by using GetProcAddress and on the dll side I...
0
by: FishingScout | last post by:
I am re-writing an MS VC++ 6.0 application in Visual Studio 2005 VB.NET. In order for my new application to communicate with some hardware (an RFID reader) I need to communicate with a DLL that...
4
by: FishingScout | last post by:
I am re-writing an MS VC++ 6.0 application in Visual Studio 2005 VB.NET. In order for my new application to communicate with some hardware (an RFID reader) I need to communicate with a DLL that...
16
by: Martin Joergensen | last post by:
Hi, I wanted to try something which I think is a very good exercise... I read in data from the keyboard and store them in a structure. There's a pointer called "data_pointer" which I use to...
1
by: nickolais909 | last post by:
Hello, I have an old C++ DLL that I am wishing to use in a VB.NET program. Previously I had a VB6 program that would pass a Type to a DLL function. For example, I would pass a variable of this...
11
by: Ground21 | last post by:
Hello. I'm new // sorry for my english :) I have to write simple program i c++. But I don't know how to code src - program should know it's name (unit1.exe so the name is "unit1" or "unit1.exe"...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.