[Insight-users] How to update an exeption to a GUI?

J Mst gave_edgar at hotmail . com
Wed, 07 May 2003 14:49:27 +0000


Hi all,

I am making a program with MFC and the building / linking process is going 
well. But when I run the program ( loading 2 images, adjust some 
registration parameters, then starting the registration process ), it throws 
me an exeption.

The problem is now, that I am not able to catch this exeption by using a 
try/catch structure. When working in the command line, I simply use the 
following code:

         catch( itk::Exception & err)
              {
                   std::cout << err << std::endl;
              }

But when I am working within MFC, I want to upload the error to an edit box 
in the GUI. I declare an CString variable to this box. Now I hoped to upload 
the error to the edit box by using the following code:

          catch( itk::Exception & err )
               {
                    variable = err;
               }

This doesnt work, and I am sure that there is a simple solution to my 
problem but I cant find it :S. I just want the same funtionality as the 
"cout << err <<". When I can do that, I would also like to use the edit box 
to update the GUI with the current iteration etc.

Does anyone know how to do this?

ps: I have checked out the MutualInformationEuler2D example, and I see that 
they are using an fl_browser to update the current iteration etc. I would 
like to know if there is something simple like that is available in MFC.

Joris

_________________________________________________________________
Chatten met je online vrienden via MSN Messenger. http://messenger.msn.nl/