I have a main dialog app (created with MFC App Wizard, VC++). When the user hits a button, a new dialog app comes up. Im having trouble returning a variable that the new pop up dialog calculates.
Here is the problem:
The original dialog app is created from BF1942Dlg.cpp. The new dialog that pops up uses TestDialog.cpp. Now, I call the dialog like this: TestDialog dlg(NULL,Source). Source is a CString indicating the exe I am going to extract an icon from. Now, the TestDialog dialog has a list box. The list box lists all of the icon ids and whenver the user single clicks an id the icon is drawn on the TestDialog window. What I want is that when the user double clicks on an id the pop up dialog closes and the icon handle is returned to my main app. I can easily get the icon handle but I do not know how to return this handle to my main app.
In my OnSelchangeList1() method I calculate an icon handle and store it in HICON icon, a member of TestDialog. In my OnDblclkList1() I want to somehow get the var icon back to the dialog that created the popup and then exit (by calling OnOK()).
Any suggestion on how to do this?
Thanx for the help,