?
Solved

User Interface

Posted on 1998-08-13
1
Medium Priority
?
212 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 360 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

765 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