Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VC++ 5.0 Modeless Dialog box
Message
De
25/02/1999 09:02:59
Shane Gilbert
Oklahoma State Department of Education
Norman, Oklahoma, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
VC++ 5.0 Modeless Dialog box
Divers
Thread ID:
00191380
Message ID:
00191380
Vues:
59
I tried posting this on some VC++ forums, but no other forum is as helpful as the UT! I have written a simple dialog based program using the MFC Wizard. The program uses the AfxInet classes to connect to the internet and then FTP transfer files. It worked fine when the dialog box was run using DoModal(). I added the option of running the program using command line options so that it could be run from another program without user actions. I had to change the way the dialog box was ran to modeless so that I could control the creation, execution, and destruction of the dialog box. Now, whenever there is a problem with the connection or the transfer it gives an abormal program exit message. Before it would give a text message describing the error (ie. Unable to connect to server). I surrounded the connection code with try and catch, and now I can catch the error without crashing but all I get in return is an error code( 12003 or something like that). What is causing the different behavior from Modal to Modeless. Is there a way to access and control a modal dialog from the application object? Or am I going about this completely wrong? As it is now, it works. But I would really like for it to display a usable error message instead of some code that the user will have no idea what it means. I guess I could create a table with the codes and error messages and handle it myself. But since it was working before I went modeless, I should be able to make it work! Thanks for any suggestions.

Shane
--Shane
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform