How do I send input data from a dialog box to an object?
Posted on 2004-11-12
I am completely new to this place and I am still confused where to post a question and further more - whether this is the exact place for my problem. Please, forgive me if I am wrong.
I am working on a project under .NET's Visual C++ Win32 Application. I am not using Managed Extensions for C++. The program consists of a main window and a dialog, called when the user clicks on a menu from the main window. The dialog appears and then the user inputs data in some edit boxes. How do I elicit the input information from the dialog and send it to a container, that is developed by me. I have created a class, that encapsulates a list of some objects. My aim is creating a pointer to this class(by creating the object dynamically) as a local variable in a function and then using the pointer as a control in order to push data into the list. Well, the problem is that by calling the DialogBoxProcedure, this pointer is no more visible. By clicking, for example, the OK button, the input data must be read and then pushed into the list. Does anybody know how to deal with this problem. Declarating the pointer as a global variable sounds terrible for me :(