VC++ beginner design question--calculator

2012-03-21  Source: Original Site  Category:Visual C++  Views:0 

Advertisement

I'm working on a simple calculator dialog app, and I can't figure out how to organize it. It seems to me, the dialog window is like a form, and my Calculator object should use that form to retrieve and display information. To display information, I need something like this:

Calculator object
-----------------
pDialogWindow ------------------> MFC generated dialog object

But, to get information from the dialog window, I also need a pointer back to the Calculator object

Calculator object
-----------------
pDialogWindow ------------------> MFC generated dialog object
-------------------------
<----------------- pCalculatorObj
Is that a normal construct with MFC programs?

Or, I thought about nesting the Calculator class in the Dialog class, which seems like it would make transfering info easier but doesn't seem like the appropriate relationship.

Related articles
  • VC++ beginner design question--calculator 2012-03-21

    I'm working on a simple calculator dialog app, and I can't figure out how to organize it. It seems to me, the dialog window is like a form, and my Calculator object should use that form to retrieve and display information. To display information, I n

  • Object Oreinted inheritance design question 2012-01-31

    I have two OOP design questions: 1. I have four classes say A, B, C, and D. B is derived from A. Class C is derived from B, but it is an optional class in my toolkit. Class D is also optional, but it needs to be derived from class C if it is used, ot

  • A design question on accessing derived class functions from base class pointers. 2012-03-05

    I have a design question which I have not been able to find a satisfactory answer for by searching. Essentially, I have a class - Base - that contains a vector of pointers to another class - Node. However, I would like to be able extend both the Base

  • Ubuntu 2 beginner's questions 2012-03-10

    I have two small beginner's questions: 1. Installation of new programs: I've notcied that if I install new programs via the add/remove program GUI, everything works fine, and the new programs are installed correctly - meaning, they are now added to t

  • User Management Design Question 2012-03-17

    I have a db design question which has me going round in circles a bit. We have a 3 tier user management system in our application. Up to now its been fine but now our clients want to expand the user types. At the moment we would have the following Ac

  • databinding & general design question 2012-03-21

    First, a design question: I have a windows forms GUI class which should display data stored in another class. This other class represents the data corresponding to a 'part' that this program is going to operate on. There will be many parts, so I've m

  • A beginner's question regarding RPF 2012-05-30

    I would like to know can I use RPF real-time monitoring to monitor my application(*build by c++ and c# and not a web based application*) and jump to the source code of my application to do the code analysis? I know it's a beginner's question, I reall

  • PL/SQL design question for Oracle 10g on UNIX 2012-06-25

    PL/SQL design question for Oracle 10g on UNIX .... When logging an error into a log table, does it not make sense to include PRAGMA AUTONOMOUS_TRANSACTION in the logging proc so as not to COMMIT anything other than the error to the log table? Example

  • OT: Design question 2012-08-26

    I have a design question I hope someone can answer. If I were to design a program for a Movie Rental place (which i am not) where there would be 4 computers accesing a movie and client database, what sort of database would I use ? What kind of DB are

  • C++ design question. Multiple inheritance 2012-09-26

    I have a C++ design question as to how to deal with multiple inheritance. Please bear with em as I try to explain what I am trying to do. This is a bit long but I hope I present my problem efficiently. In my application, I have a singletom object cal

  • nontrivial design question: operators, wrappers, and member functions 2012-11-02

    So, I've got another design question. Let's say I have a class Field that represents a scalar function over 3d space. Operations on that field (multiplication, addition, transformations, etc.) are implemented by wrapping the Field with a subclass tha

  • Oracle Design Question - Plsql Gateway, Data Query, File Download 2012-12-07

    I have a design question: I want to do a simple query on the web and return the first twenty results into an html table, then have a link to download the results in their entirety (to make sure the user requested the right query.) What I'm thinking i

  • Serialisation of array of objects (design question) 2012-12-30

    you experts have been friendly and very helpfull in the past so I'll try my luck once more with this design question I'm facing. I'm wondering what the best way is to tackle my problem. I'm wondering because of my lack of experience so help me out pl

  • Ubuntu GTK Beginner's question - progressbar 2013-01-31

    I have another beginner GTK question: I have a progressbar defined and showing on the screen. It is defined as a global. I am trying to compute the % and update the progressbar, but instead no bars ever show on the progress bar. Here's the code that

  • generic design question 2013-02-16

    I've got a very generic design question. The situation: I need to store a large amount (~1000 per day) of combined texts in a database. Combined text means every logical text"unit" consists of several independent parts, say "title, abstract, body". A

  • Ubuntu Beginner-ish questions. 2013-10-26

    everyone! On my first post I thought i'd get my beginner-ish questions/suggestions out the way. I think the Add/Remove programs menu is a great feature of Ubuntu, and I think it should be made more prominent on the website, it's one of the reasons I

  • users and groups - db design question 2013-11-13

    I don't have any code yet so this is a bit of an abstract design question... I have a set of authors and a set of groups. Each group has a number of pages that the authors have access to for adding/updating content. When setting up my db tables and c

  • Designing a Calculator in wxPython 2014-03-26

    wxPython is a library that makes it easy for Python programmers to build graphical user interfaces. Over the past few weeks, you have seen some articles covering this library. This week, you will learn how to create a simple but useful application wi

  • Beginner's question about network programming 2014-08-10

    I wrote a network program with socket API, it can work well currently, but I still worry about the following three questions: 1. When sending message, is it possible that not all sended message is sended by system really. I mean, for example, when I

  • Oracle ORDBMS design question 2014-08-23

    I have database design questions and I am not sure which discussion group I should attend. so I post my question here. here are my questions. 1. how to implement the generization relationship in oracle prior to Oracle9i? 2. For composition relationsh