Solved

User Interface

Posted on 1998-08-13
1
195 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 217
Get filename and folder into excel 7 79
java ^ examples 8 69
Problem to event 3 102
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

791 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