Hi,
Federico Simon <claus...@gmail.com> hat am 25. April 2013 um 23:18 geschrieben:
Hi All:
I'm creating a DISLIN widget from an MFC dialog window like so:
Dislin g;
g.swgopt("OK","CLOSE");
try{
widget();
}catch(...){}
And everything works fine EXCEPT for the fact that when I close the widget, my whole program closes too. I was wondering what the 'correct' way to open up a widget is, or a workaround to prevent the closing of the dislin widget from closing my entire program.
the option swgopt ("OK", "CLOSE") should effect that the program is continued after wgfin if the
closed button of the main widget window is clicked. I have tested it with the following small code
for several compilers. It seems to work.
----
#include <iostream>
#include "discpp.h"
int main ()
{ int ip;
Dislin g;
g.swgopt("OK","CLOSE");
ip = g.wgini ("vert");
g.wgfin ();
std::cout << "Test\n";
return 0;
}
-----
Best regards,
Helmut