Board index » delphi » DTM_SETFORMAT?

DTM_SETFORMAT?


2003-08-28 10:34:12 PM
delphi21
Hello,
I'm trying to do my own DbDateTimePicker component, since i can not find a
suitable one. When the datetime field is empty, i want my component to
display a string that says that there is no date, it is empty etc... using
this -
SendMessage(Handle, DTM_SETFORMAT, 0, LongInt(PChar('the date is
empty'))).
But the problem is that the string "the date is empty" is not displayed
correcrly... some letters are replaced by numbers etc... So, i assume it has
some string conversion problems, but i can not seem to understand what is
excartly wrong. Any ideas?
Thanks,
Martin.
 
 

Re:DTM_SETFORMAT?

"Martin Hellat" <XXXX@XXXXX.COM>writes
3f4e12e8$XXXX@XXXXX.COM...
Quote
But the problem is that the string "the date is empty" is not displayed
correcrly... some letters are replaced by numbers etc... So, i assume it
has some string conversion problems, but i can not seem to understand what
is excartly wrong. Any ideas?
Put it in single quotes:
'''the date is empty'''
Cheers,
Ignacio
 

Re:DTM_SETFORMAT?

Hehe, of course, without quotes it took my string as a datetime formatting
string... gotta stop working long hours:)
Martin.
"Ignacio Vazquez" <ivazquezATorioncommunications.com>writes
Quote
"Martin Hellat" <XXXX@XXXXX.COM>writes
3f4e12e8$XXXX@XXXXX.COM...
>But the problem is that the string "the date is empty" is not displayed
>correcrly... some letters are replaced by numbers etc... So, i assume it
>has some string conversion problems, but i can not seem to understand what
>is excartly wrong. Any ideas?

Put it in single quotes:

'''the date is empty'''

Cheers,
Ignacio

--
No, don't send me e-mail directly. No, just don't.