🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: blank values in DateTimePickers

#9318
From: Mark Jacobs
Date: Thu, 15 Jul 2004 13:00
18 lines
1549 bytes
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: <40f67ffe$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!irazu.switch.ch!switch.ch!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>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,aad838891ad1623f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Mark Jacobs" <markj atty critical dotty co dotty uk>
From: "Mark Jacobs" <markj atty critical dotty co dotty uk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40f67f25$1@newsgroups.borland.com>
Subject: Re: blank values in DateTimePickers
Date: Thu, 15 Jul 2004 14:00:46 +0100
Lines: 20
Organization: DK Computing
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 81.144.157.8
Message-ID: <40f67ffe$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089896446 81.144.157.8 (15 Jul 2004 06:00:46 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!irazu.switch.ch!switch.ch!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail