Solved

User Interface

Posted on 1998-08-13
1
202 Views
Last Modified: 2013-11-20
I am currently writing a program in C++ to work out the optimal way to cut stock. I am reading the orders in from a datafile and attempting to print out the results to a printer.
I have not used visual C++ before and want to know how easy it will be to transfer the program to visual C++ and add a reasonably straightforward GUI with the following features:

1) Read in the values from a spreadsheet or grid type of format
2) Allow the user to save /load the values from/to disk
3) Send the results to a printer after being processed by my algorithm


I also have a pre written text class and list class which i want to use. Is it easy to integrate these into the visual C++ structure.
Would I use the wizard to add these features to my C++ program or do I need to put in special code myself.

I don't know if these are relatively straightforward problems or require alot of work?
0
Comment
Question by:Paul10
[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 8

Accepted Solution

by:
Answers2000 earned 180 total points
ID: 1320740
My suggest is first of all to try a couple of practice apps on Visual C++ (e.g. some samples that came with the compiler or Prosise book samples).  Also buy objective grid from Stingray (this is a lot easier than writing it your self and doesn't cost much).

When you're ready to go for it :-
(a) Use the Class Wizard to generate a new App.  I would suggest you pick SDI as this is simplest.  Make your view class (it will be called something like CMyAppView) derive from CEditView.  
(b) Now add the stingray library to your project.  Change your view class to derive from their Grid View class instead of CEditView class to
(c) Now add the file reading and writing code.  This best goes inside the Serialize functions in the class which is derived from CDocument (which will be called something like CMyAppDoc)
(d) Alter the menu resources using the resource editor in dev-studio to have any changes you want.
(e) Add code to the View/Class using the class wizard (press Ctrl-W)
(f) For printing - put the code in OnDraw.  You can just sort of draw it out onto the printer (you give X,Y coords etc and can draw lines, text, etc.)

Your list class - if you mean it does linked lists etc. - you can probably just add it (but you should consider using MFC's CList class instead which is very good).  If you mean it does some special kind of list boxes you will have to change the code - derive from CWnd.

Your text class - same kind of things.  If it's a windowing class, derive it from CWnd or CEdit.

The easiest way to derive from CWnd/CEdit is to create a **new class** using class wizard, then cut & paste your existing code in.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 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