Hi,

I am programming in VC++/MFC to make applications for Bus, Airline and other ticket booking softwares. In those applications i need to display the available Buses/Flights in as in Web pages. i.e., like tables. A row for a flight like that. Currently I am making such a view by creating 16 to 18 static(CStatic) controls for a single flight. I have arranged the statics to be a cell of a row and display the detail(For Eg: Flight No, Departure time etc.,). If the number flights is more than say 100 i have to create nearly 2000 static controls to display the whole list of flights. If it exceeds in number then the creation of controls fails due to unavailable memory(Getting Error: "Out of Memory"). Could any body suggest me an alternative solution to the problem i am facing? Is there any other way of displaying the flights/buses in the same way As i have did?

Since no one else has responded, I'll throw in my $0.02, which isn't worth much when dealing with MFC.

How are you allocating the data? Is it all at once (in one big chunk)? The computer can't handle that. Make sure you allocate in fragments.

Personally, I don't think you should need to allocate all the information at one time. Allocate a small chunk (say, 10..30 rows, or whatever), fill them in, send them to output, rinse and repeat.

If I understand you correctly, your program produces an HTML file that is displayed to the user, right? If it is an issue of using more than one table to display the data or not, don't worry about it. The user will have no clue if you use more than one table. Just make sure to place them all in a single DIV or something so that they are consecutively selectable...

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.