 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Daryl Guest
|
Posted: Mon Jan 26, 2004 9:11 pm Post subject: Can't get this to work, please help... |
|
|
Hi
I have been trying to get SysErrorMassage to successfully display the
Windows error message and I don't understand why! Could someone please
help...
Maybe I am missing a critical header file? I get no compiler warnings or
errors.
Thanks
Daryl
MessageDlg("Error msg : " + SysErrorMessage((int)GetLastError),
mtError, TMsgDlgButtons() << mbOK, 0);
//or
ShowMessage((int)GetLastError);
|
|
| Back to top |
|
 |
Bruce Salzman Guest
|
Posted: Mon Jan 26, 2004 9:32 pm Post subject: Re: Can't get this to work, please help... |
|
|
| Quote: | MessageDlg("Error msg : " + SysErrorMessage((int)GetLastError),
mtError, TMsgDlgButtons() << mbOK, 0);
|
Try
MessageDlg(AnsiString("Error msg : ") + SysErrorMessage((int)GetLastError),
mtError, TMsgDlgButtons() << mbOK, 0);
Regards,
Bruce
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Jan 26, 2004 11:31 pm Post subject: Re: Can't get this to work, please help... |
|
|
"Daryl" <stockd (AT) tpg (DOT) com.au> wrote
| Quote: | I have been trying to get SysErrorMassage to successfully display
the Windows error message and I don't understand why!
|
You are missing a pair of parenthesis each time you call GetLastError(). It
is a function, afterall:
MessageDlg("Error msg : " + SysErrorMessage(GetLastError()), mtError,
TMsgDlgButtons() << mbOK, 0);
ShowMessage(GetLastError());
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|