Page 1 of 1

Time Picker?

Posted: Fri May 16, 2008 2:13 am
by fraxzi
Date picker is fine... It works elegantly.

How about Time picker? I cant find any working sample here


Regards

Posted: Sun May 18, 2008 8:26 am
by Antonio Linares
Frances,

Please review fwh\samples\DateTime.prg

Posted: Sun May 18, 2008 11:56 am
by fraxzi
I already did... but error compiling ... Unresolved external '_HB_FUN_TTIMEPICK


I used TTime() and it worked well on my function...


My problem now is how to do a blank date on DEFINE DTPICKER using resource "SysDateTimePick32"?

even if I make the variable value to CToD("..") still not blank :roll:


Can you elaborate please?


Regards,

Posted: Mon May 19, 2008 8:09 am
by StefanHaupt
Frances,

add DTS_SHOWNONE to the style and you can have empty dates.

[/code]

Posted: Mon May 19, 2008 8:41 am
by fraxzi
Hi Stefan!

I can't find DTS_SHOWNONE value anyware in my FWH... ERROR Compiling my .RC with 'expecting window control style' :cry:


I Can't find any working sample here either.


Thanks for the input and regards,




Ooooppppsssss

I found it!

#define DTS_SHOWNONE 0x0002

Posted: Mon May 19, 2008 8:59 am
by fraxzi
I Got it!


cDateTime := CToD('')
cTimeDate := ''

....

REDEFINE DTPICKER oDate VAR cDateTime;
ID 114 OF oDlg

REDEFINE DTPICKER oTime VAR cTimeDate;
ID 115 OF oDlg
.....


In RC:

#define DTS_SHOWNONE 0x0002
#define DTS_TIMEFORMAT 0x0009

....Date Format.....
CONTROL "", 114, "SysDateTimePick32", DTS_SHOWNONE| WS_TABSTOP, 53, 186, 76, 16

....Time Format.....
CONTROL "", 115, "SysDateTimePick32", DTS_TIMEFORMAT | DTS_SHOWNONE| WS_TABSTOP, 53, 186, 76, 16



Thank you Mr. Antonio and Mr. Stefan... You gave me a good kickstart!

Posted: Mon May 19, 2008 11:40 am
by Antonio Linares
Very good :-)