🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9319

Re: blank values in DateTimePickers

#9319
From: Kevin Johnson
Date: Thu, 15 Jul 2004 14:06
34 lines
2091 bytes
Hay Mark, thanks for the post - bit confused though, not sure exactly how to
implimnet you code below.  I've just knocked upa quick test.  Dropped two
TDateTimePickers on the form, added you function and called it, passing the
value of the first DateTimePicker - doesn't seem to do anything.  Then tried
calling your code, then assigning a blank value to the DateTimePicker - now
I get the usual exception about invalid date.  Sorry, can you give me some
more pointers,

Thanks


"Mark Jacobs" <markj atty critical dotty co dotty uk> wrote in message
news:40f67ffe$2@newsgroups.borland.com...
> Leave them blank, and put the following code into your program, calling it
for
> each empty dtp :-
>
> void initdtmpkr(TDateTimePicker *dtmpkr)
> {
>   NMDATETIMECHANGE dtc; SYSTEMTIME now;
>   GetSystemTime(&now); dtc.nmhdr.hwndFrom=dtmpkr->Handle;
> dtc.nmhdr.idFrom=NULL;
>   dtc.nmhdr.code=DTN_DATETIMECHANGE; dtc.dwFlags=GDT_VALID; dtc.st=now;
>   dtmpkr->Perform(WM_NOTIFY,NULL,(int)&dtc);
> }
>
> You don't have to populate them with a date if you use the above.
> -- 
> Mark Jacobs
> DK Computing
> http://www.dkcomputing.co.uk
> markj atty critical dotty co dotty uk
>
>
Technical Details
Message-ID: <40f68cfe@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40f67f25$1@newsgroups.borland.com> <40f67ffe$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,aad838891ad1623f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kevin Johnson" <kevjson@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40f67f25$1@newsgroups.borland.com> <40f67ffe$2@newsgroups.borland.com>
Subject: Re: blank values in DateTimePickers
Date: Thu, 15 Jul 2004 15:06:08 +0100
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 82.39.123.106
Message-ID: <40f68cfe@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089899774 82.39.123.106 (15 Jul 2004 06:56:14 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail