How to get actual object of class which is in memory
-
I have SDI application in which there are two dialogs which are opened at run time. One dialog is modeless and onclick of button on this modeless dialog One modal dialog is coming. Now based on selection of listbox on modal dialog I want to fillup fields on modeless dialog. For the same I require the object of class which is running in memory. How to achieve it.
|| ART OF LIVING ||
-
I have SDI application in which there are two dialogs which are opened at run time. One dialog is modeless and onclick of button on this modeless dialog One modal dialog is coming. Now based on selection of listbox on modal dialog I want to fillup fields on modeless dialog. For the same I require the object of class which is running in memory. How to achieve it.
|| ART OF LIVING ||
shivditya wrote:
Now based on selection of listbox on modal dialog I want to fillup fields on modeless dialog.
Not possible, since the modal dialog must be dismissed first before the modeless dialog can continue processing its messages.
shivditya wrote:
For the same I require the object of class which is running in memory.
This makes no sense. Please elaborate.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
shivditya wrote:
Now based on selection of listbox on modal dialog I want to fillup fields on modeless dialog.
Not possible, since the modal dialog must be dismissed first before the modeless dialog can continue processing its messages.
shivditya wrote:
For the same I require the object of class which is running in memory.
This makes no sense. Please elaborate.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Actually I myself was able to do it cnc was object of my modeless class. what I done is I declared it in MainFrame.h Then by (CMainFrame*)AfxGetMainWindow()->cnc I was able to get object of modeless class in modal dialog. From cnc I was able to access all fields on form and everything worked out well. Modification -- yes modal dialog closes once I confirm selection,I didnot mentioned that condition,and I think that is even possible for a separate thread.
|| ART OF LIVING ||
-
Actually I myself was able to do it cnc was object of my modeless class. what I done is I declared it in MainFrame.h Then by (CMainFrame*)AfxGetMainWindow()->cnc I was able to get object of modeless class in modal dialog. From cnc I was able to access all fields on form and everything worked out well. Modification -- yes modal dialog closes once I confirm selection,I didnot mentioned that condition,and I think that is even possible for a separate thread.
|| ART OF LIVING ||
Sounds rather kludgy, but glad you got it going.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne