From: hahoyer on
Which part MFC/MSWindows creates the message "an invalid argument was
encountered"? Why this message is usually created? How can I customize
it, to
a) throw an execption instead
b) add more information on the environemt that created that message
Greetings Harald

From: Tom Serface on
I've seen this message in a few instances:

1. CTime used in CFile has a problem where it returns a time that is
incompatible (0 I think) and that does error. I finally created my own
version of
CFile::GetFileStatus() that does a check like:

if(nTimeTest != 0)
rStatus.m_ctime = CTime(findFileData.ftCreationTime);
else if(nWTimeTest != 0)
rStatus.m_ctime = CTime(findFileData.ftLastWriteTime);
else
rStatus.m_ctime = CTime::GetCurrentTime();

I had this problem mostly when using Berlin,Germany since I think they are
pretty close to GMT (certain times of the day didn't work). CTime seems to
be really fussy about some times.

2. You get this message (and ASSERTS) if you have a control on a dialog
that you delete, but the handler for the control is still in the DDV, DDX
part in the dialog handler file.

Tom

"hahoyer" <harald.hoyer(a)s4m.de> wrote in message
news:1131965490.246029.224530(a)o13g2000cwo.googlegroups.com...
> Which part MFC/MSWindows creates the message "an invalid argument was
> encountered"? Why this message is usually created? How can I customize
> it, to
> a) throw an execption instead
> b) add more information on the environemt that created that message
> Greetings Harald
>


From: Ajay Kalra on
Its likely that an exception is already being thrown. You can check it
while debugging. In VC6, you can catch exceptions under
Debug->Exceptions menu. You can select all and stop always.

------------
Ajay Kalra
ajaykalra(a)yahoo.com

From: hahoyer on
The problem is, that this all happens at customers site. In addition it
is hard to reproduce.
So I still hope that anybody knows, how to deal with this "singularity"
in the following sense:
How can I customize it, to
a) throw an execption instead (since our application provides very good
means to observe them)
b) add more information on the environemt that created that message
Greetings Harald

From: Tom Serface on
If you customer is in a different timezone than you I'd take a close look at
all of the CTime calls you have. Also, you can change your locale to match
the customers and see if you can reproduce the problem then. I've caught
lots of problems by tricking my computer into thinking we were somewhere
else.

Tom

"hahoyer" <harald.hoyer(a)s4m.de> wrote in message
news:1132050045.225826.306720(a)g43g2000cwa.googlegroups.com...
> The problem is, that this all happens at customers site. In addition it
> is hard to reproduce.
> So I still hope that anybody knows, how to deal with this "singularity"
> in the following sense:
> How can I customize it, to
> a) throw an execption instead (since our application provides very good
> means to observe them)
> b) add more information on the environemt that created that message
> Greetings Harald
>


 |  Next  |  Last
Pages: 1 2
Prev: CTabCtrl & XP Style
Next: Transparent Checkbox : How to