PDA

View Full Version : How to draw a chart like spreadsheet in C



dv007
05-29-2002, 02:01 PM
Hi people,
I try to create a Inventory program in C with
final output display in a chart like below:
___________________________________________
| Stock Name | StockID | Price | Quantity |
------------------------------------------
| Shampoo | SP999 | 3.75 | 100 |
-------------------------------------------
| Candy | CD3333 | 0.20 | 400 |
-------------------------------------------
| | | | |
-------------------------------------------
| | | | |
-------------------------------------------

What graphic functions I can use to make a perfect
drawing the chart(not broken lines as above)?
Can I use the functions like: drawline(), drawrectangle(), or gotoxy()..etc.
in order to make to draw the chart perfectly?

I really appreciate your help or your idea.
DV007

sean
05-29-2002, 09:00 PM
I have a program the Borland made called TCalc that was like a spreadsheet program - it's a perfect example and should answer a lot of questions - I have the source code edition. I'll ZIP it and post it here tomorrow, but I've gotta run - so I can help you tomorrow, but it least you know theres hope.

dv007
05-29-2002, 09:54 PM
:rolleyes: Thanks for a clue, Sean. Talk with ya tomorrow.

DV007
/****************************************
* SWYM = MWYS *
* Say What You Mean. Mean What You Say. *
****************************************

sean
05-31-2002, 03:48 PM
Hope this helps. the .prj only works on Borland Turbo C++ 3.0 for DOS, but it's only an organization thing - it's not any of the source code. I hope you have WinZIP because this is zipped with that, and the doc is for Windows other than that, just start with tcacl.c, and you should be able to figure it out from there.

red_baron
06-01-2002, 11:33 AM
maybe this might help
http://www.cprogramming.com/cboard/showthread.php?s=&threadid=18827
go to the bottom of the page i posted my table creating function.

sean
06-03-2002, 03:55 PM
Let me know if that works. I tried compiling it and it just came up with errors one every line.

dv007
06-06-2002, 07:11 AM
Yup Sean, I got a lot of errors when I compiled it. I have traced all source code and it looks
fine to me. But when I compiled with Borland C/C++
v5.1 compiler, it showed many errors. By using it
as reference, I have been trying to write my own code. I still working on this program.
Thank you anyway.
DV007

sean
06-06-2002, 01:28 PM
I'd like to see it. Email it to me when you're finished.