I don't know about the spin control, but I have DTS_SHORTDATECENTURYFORMAT
instead of the DTS_LONGDATEFORMAT and it is working for me.
  Art

> OK,
> I'm on the way to solving it.
> Adding the style DTS_LONGDATEFORMAT to the .rc file gives me a DTP
> control with a calendar pulldown.
> Specifying "Short Date" in ResEdit gives no style in the .rc file,
> and this produces a control with time showing plus a spin control
> but no calendar - in spite of specifying "Use Spin Control = False".
>
>
> Thanks to Mark's UserStringDTP.rex
> sample.
>
> --
> Oliver Sims
>
>
> From: Oliver Sims
> [mailto:oliver.s...@simsassociates.co.uk]
> Sent: 25 February 2013
> 17:51
> To:
> 'oorexx-users-ow...@lists.sourceforge.net'
> Subject: Problerm with
> DateTime control
>
>
> I want a datetime
> control that has a drop-down calendar. According to the MS Controls
> documentation, I should (I think) get this by default. I wrote a
> little test
> dialog, and all I get is inoperable spin controls to the right of
> the control. No calendar.    My test progam is:   ------------------
> -------------------------------------- /* Sample DateTimePicker
> Program */   .Application~setDefaults("O","SampleDTP.h",.false)  
> dlg = .MyDTP~new("SampleDTP.rc", "IDD_DIALOG1")
> dlg~execute("SHOWTOP") return 0   ::REQUIRES "ooDialog.cls"  
> ::class MyDTP subclass RcDialog     ::method init     forward class
> (super) continue     ::method initDialog     dtp =
> self~newDateTimePicker("IDC_DATETIMEPICKER1")
>
> --------------------------------------------------------
>
>
> The resource file
> is:
>
>
> --------------------------------------------------------
> #include
> <windows.h>
> #include <commctrl.h>
> #include
> <richedit.h>
> #include "SampleDTP.h"
> //
> // Dialog resources
> //
> LANGUAGE LANG_NEUTRAL,
> SUBLANG_NEUTRAL
> IDD_DIALOG1 DIALOG 0, 0, 186, 161
> STYLE DS_3DLOOK |
> DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE
> | WS_POPUP | WS_SYSMENU CAPTION "Dialog" FONT 8, "Ms Shell Dlg" {   
>   DEFPUSHBUTTON   "OK", IDOK, 129, 7, 50, 14     PUSHBUTTON     
> "Cancel", IDCANCEL, 129, 24, 50, 14     CONTROL         "",
> IDC_DATETIMEPICKER1,
> DATETIMEPICK_CLASS, WS_TABSTOP | DTS_APPCANPARSE | DTS_RIGHTALIGN,
> 35, 50, 100, 15     EDITTEXT        IDC_EDIT1, 63, 103, 40, 14,
> ES_AUTOHSCROLL } ---------------------------------------------------
> -----
>
>
> The header file
> is:
>
>
> --------------------------------------------------------
> #ifndef
> IDC_STATIC
> #define IDC_STATIC (-1)
> #endif
>
> #define
> IDD_DIALOG1                            
> 100
> #define
> IDC_EDIT1                              
> 1000
> #define
> IDC_DATETIMEPICKER1                    
> 1002
> --------------------------------------------------------
>
>
> Software: ooDialog
> version 4.2.2.8952, ooRexx version 4.1.1(MT) 6.03 May 2012.
>
> Any help gratefully
> received. Btw, I'm running on XP (if that makes any
> difference)
>
> Many thanks.
>
> --
> Oliver
> Sims


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to