wx/msw/commandlinkbutton.h \
wx/msw/calctrl.h \
wx/msw/datectrl.h \
+ wx/msw/datetimectrl.h \
wx/msw/hyperlink.h
@COND_TOOLKIT_MSW@ADVANCED_PLATFORM_NATIVE_HDR = $(COND_TOOLKIT_MSW_ADVANCED_PLATFORM_NATIVE_HDR)
COND_TOOLKIT_WINCE_ADVANCED_PLATFORM_NATIVE_HDR = \
wx/msw/commandlinkbutton.h \
wx/msw/calctrl.h \
wx/msw/datectrl.h \
+ wx/msw/datetimectrl.h \
wx/msw/hyperlink.h
@COND_TOOLKIT_WINCE@ADVANCED_PLATFORM_NATIVE_HDR = $(COND_TOOLKIT_WINCE_ADVANCED_PLATFORM_NATIVE_HDR)
COND_WXUNIV_0_ADVANCED_HDR = \
monodll_commandlinkbutton.o \
monodll_datecontrols.o \
monodll_datectrl.o \
+ monodll_datetimectrl.o \
monodll_msw_hyperlink.o
@COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS = $(COND_TOOLKIT_MSW___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS)
COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS = \
monodll_commandlinkbutton.o \
monodll_datecontrols.o \
monodll_datectrl.o \
+ monodll_datetimectrl.o \
monodll_msw_hyperlink.o
@COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS = $(COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS)
@COND_TOOLKIT_COCOA@__MEDIA_PLATFORM_SRC_OBJECTS = \
monolib_commandlinkbutton.o \
monolib_datecontrols.o \
monolib_datectrl.o \
+ monolib_datetimectrl.o \
monolib_msw_hyperlink.o
@COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1)
COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 = \
monolib_commandlinkbutton.o \
monolib_datecontrols.o \
monolib_datectrl.o \
+ monolib_datetimectrl.o \
monolib_msw_hyperlink.o
@COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 = $(COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1)
@COND_TOOLKIT_COCOA@__MEDIA_PLATFORM_SRC_OBJECTS_1 = \
advdll_commandlinkbutton.o \
advdll_datecontrols.o \
advdll_datectrl.o \
+ advdll_datetimectrl.o \
advdll_msw_hyperlink.o
@COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2)
COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 = \
advdll_commandlinkbutton.o \
advdll_datecontrols.o \
advdll_datectrl.o \
+ advdll_datetimectrl.o \
advdll_msw_hyperlink.o
@COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 = $(COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2)
@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_2 \
advlib_commandlinkbutton.o \
advlib_datecontrols.o \
advlib_datectrl.o \
+ advlib_datetimectrl.o \
advlib_msw_hyperlink.o
@COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3)
COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 = \
advlib_commandlinkbutton.o \
advlib_datecontrols.o \
advlib_datectrl.o \
+ advlib_datetimectrl.o \
advlib_msw_hyperlink.o
@COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 = $(COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3)
@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_3 \
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_msw_hyperlink.o: $(srcdir)/src/msw/hyperlink.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/hyperlink.cpp
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_msw_hyperlink.o: $(srcdir)/src/msw/hyperlink.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/hyperlink.cpp
@COND_TOOLKIT_WINCE_WXUNIV_0@advdll_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(ADVDLL_ODEP)
@COND_TOOLKIT_WINCE_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
+@COND_TOOLKIT_MSW_WXUNIV_0@advdll_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_MSW_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
+@COND_TOOLKIT_WINCE_WXUNIV_0@advdll_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_WINCE_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
@COND_TOOLKIT_MSW_WXUNIV_0@advdll_msw_hyperlink.o: $(srcdir)/src/msw/hyperlink.cpp $(ADVDLL_ODEP)
@COND_TOOLKIT_MSW_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/hyperlink.cpp
@COND_TOOLKIT_WINCE_WXUNIV_0@advlib_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(ADVLIB_ODEP)
@COND_TOOLKIT_WINCE_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
+@COND_TOOLKIT_MSW_WXUNIV_0@advlib_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_MSW_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
+@COND_TOOLKIT_WINCE_WXUNIV_0@advlib_datetimectrl.o: $(srcdir)/src/msw/datetimectrl.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_WINCE_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/datetimectrl.cpp
+
@COND_TOOLKIT_MSW_WXUNIV_0@advlib_msw_hyperlink.o: $(srcdir)/src/msw/hyperlink.cpp $(ADVLIB_ODEP)
@COND_TOOLKIT_MSW_WXUNIV_0@ $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/hyperlink.cpp
src/msw/commandlinkbutton.cpp
src/msw/datecontrols.cpp
src/msw/datectrl.cpp
+ src/msw/datetimectrl.cpp
src/msw/hyperlink.cpp
</set>
<set var="ADVANCED_MSW_NATIVE_HDR" hints="files">
wx/msw/commandlinkbutton.h
wx/msw/calctrl.h
wx/msw/datectrl.h
+ wx/msw/datetimectrl.h
wx/msw/hyperlink.h
</set>
$(OBJS)\monodll_commandlinkbutton.obj \\r
$(OBJS)\monodll_datecontrols.obj \\r
$(OBJS)\monodll_datectrl.obj \\r
+ $(OBJS)\monodll_datetimectrl.obj \
$(OBJS)\monodll_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\monolib_commandlinkbutton.obj \\r
$(OBJS)\monolib_datecontrols.obj \\r
$(OBJS)\monolib_datectrl.obj \\r
+ $(OBJS)\monolib_datetimectrl.obj \
$(OBJS)\monolib_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\advdll_commandlinkbutton.obj \\r
$(OBJS)\advdll_datecontrols.obj \\r
$(OBJS)\advdll_datectrl.obj \\r
+ $(OBJS)\advdll_datetimectrl.obj \
$(OBJS)\advdll_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\advlib_commandlinkbutton.obj \\r
$(OBJS)\advlib_datecontrols.obj \\r
$(OBJS)\advlib_datectrl.obj \\r
+ $(OBJS)\advlib_datetimectrl.obj \
$(OBJS)\advlib_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\monodll_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\monodll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\monodll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\monolib_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\monolib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\monolib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\advdll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\advdll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\advlib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\advlib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\monodll_commandlinkbutton.o \\r
$(OBJS)\monodll_datecontrols.o \\r
$(OBJS)\monodll_datectrl.o \\r
+ $(OBJS)\monodll_datetimectrl.o \
$(OBJS)\monodll_hyperlink.o\r
endif\r
ifeq ($(WXUNIV),1)\r
$(OBJS)\monolib_commandlinkbutton.o \\r
$(OBJS)\monolib_datecontrols.o \\r
$(OBJS)\monolib_datectrl.o \\r
+ $(OBJS)\monolib_datetimectrl.o \
$(OBJS)\monolib_hyperlink.o\r
endif\r
ifeq ($(WXUNIV),1)\r
$(OBJS)\advdll_commandlinkbutton.o \\r
$(OBJS)\advdll_datecontrols.o \\r
$(OBJS)\advdll_datectrl.o \\r
+ $(OBJS)\advdll_datetimectrl.o \
$(OBJS)\advdll_hyperlink.o\r
endif\r
ifeq ($(WXUNIV),1)\r
$(OBJS)\advlib_commandlinkbutton.o \\r
$(OBJS)\advlib_datecontrols.o \\r
$(OBJS)\advlib_datectrl.o \\r
+ $(OBJS)\advlib_datetimectrl.o \
$(OBJS)\advlib_hyperlink.o\r
endif\r
ifeq ($(WXUNIV),1)\r
$(OBJS)\monodll_datectrl.o: ../../src/msw/datectrl.cpp\r
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\monodll_datetimectrl.o: ../../src/msw/datetimectrl.cpp
+ $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\monodll_hyperlink.o: ../../src/msw/hyperlink.cpp\r
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\monolib_datectrl.o: ../../src/msw/datectrl.cpp\r
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\monolib_datetimectrl.o: ../../src/msw/datetimectrl.cpp
+ $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\monolib_hyperlink.o: ../../src/msw/hyperlink.cpp\r
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\advdll_datectrl.o: ../../src/msw/datectrl.cpp\r
$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\advdll_datetimectrl.o: ../../src/msw/datetimectrl.cpp
+ $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\advdll_hyperlink.o: ../../src/msw/hyperlink.cpp\r
$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\advlib_datectrl.o: ../../src/msw/datectrl.cpp\r
$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\advlib_datetimectrl.o: ../../src/msw/datetimectrl.cpp
+ $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\advlib_hyperlink.o: ../../src/msw/hyperlink.cpp\r
$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\monodll_commandlinkbutton.obj \\r
$(OBJS)\monodll_datecontrols.obj \\r
$(OBJS)\monodll_datectrl.obj \\r
+ $(OBJS)\monodll_datetimectrl.obj \
$(OBJS)\monodll_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\monolib_commandlinkbutton.obj \\r
$(OBJS)\monolib_datecontrols.obj \\r
$(OBJS)\monolib_datectrl.obj \\r
+ $(OBJS)\monolib_datetimectrl.obj \
$(OBJS)\monolib_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\advdll_commandlinkbutton.obj \\r
$(OBJS)\advdll_datecontrols.obj \\r
$(OBJS)\advdll_datectrl.obj \\r
+ $(OBJS)\advdll_datetimectrl.obj \
$(OBJS)\advdll_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\advlib_commandlinkbutton.obj \\r
$(OBJS)\advlib_datecontrols.obj \\r
$(OBJS)\advlib_datectrl.obj \\r
+ $(OBJS)\advlib_datetimectrl.obj \
$(OBJS)\advlib_hyperlink.obj\r
!endif\r
!if "$(WXUNIV)" == "1"\r
$(OBJS)\monodll_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\monodll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\monodll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\monolib_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\monolib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\monolib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\advdll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\advdll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp\r
\r
+$(OBJS)\advlib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp
+
$(OBJS)\advlib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp\r
\r
$(OBJS)\monodll_commandlinkbutton.obj &\r
$(OBJS)\monodll_datecontrols.obj &\r
$(OBJS)\monodll_datectrl.obj &\r
+ $(OBJS)\monodll_datetimectrl.obj &
$(OBJS)\monodll_hyperlink.obj\r
!endif\r
!ifeq WXUNIV 1\r
$(OBJS)\monolib_commandlinkbutton.obj &\r
$(OBJS)\monolib_datecontrols.obj &\r
$(OBJS)\monolib_datectrl.obj &\r
+ $(OBJS)\monolib_datetimectrl.obj &
$(OBJS)\monolib_hyperlink.obj\r
!endif\r
!ifeq WXUNIV 1\r
$(OBJS)\advdll_commandlinkbutton.obj &\r
$(OBJS)\advdll_datecontrols.obj &\r
$(OBJS)\advdll_datectrl.obj &\r
+ $(OBJS)\advdll_datetimectrl.obj &
$(OBJS)\advdll_hyperlink.obj\r
!endif\r
!ifeq WXUNIV 1\r
$(OBJS)\advlib_commandlinkbutton.obj &\r
$(OBJS)\advlib_datecontrols.obj &\r
$(OBJS)\advlib_datectrl.obj &\r
+ $(OBJS)\advlib_datetimectrl.obj &
$(OBJS)\advlib_hyperlink.obj\r
!endif\r
!ifeq WXUNIV 1\r
$(OBJS)\monodll_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<\r
\r
+$(OBJS)\monodll_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+
$(OBJS)\monodll_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<\r
\r
$(OBJS)\monolib_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<\r
\r
+$(OBJS)\monolib_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+
$(OBJS)\monolib_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<\r
\r
$(OBJS)\advdll_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<\r
\r
+$(OBJS)\advdll_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
+
$(OBJS)\advdll_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<\r
\r
$(OBJS)\advlib_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<\r
\r
+$(OBJS)\advlib_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
+
$(OBJS)\advlib_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<\r
\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\src\msw\datetimectrl.cpp
+
+!IF "$(CFG)" == "adv - Win32 DLL Universal Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "adv - Win32 DLL Universal Debug"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "adv - Win32 DLL Release"
+
+
+!ELSEIF "$(CFG)" == "adv - Win32 DLL Debug"
+
+
+!ELSEIF "$(CFG)" == "adv - Win32 Universal Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "adv - Win32 Universal Debug"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "adv - Win32 Release"
+
+
+!ELSEIF "$(CFG)" == "adv - Win32 Debug"
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\msw\hyperlink.cpp\r
\r
!IF "$(CFG)" == "adv - Win32 DLL Universal Release"\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\include\wx\msw\datetimectrl.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\wx\msw\genrcdefs.h\r
\r
!IF "$(CFG)" == "adv - Win32 DLL Universal Release"\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\include\wx\msw\datetimectrl.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\wx\msw\dc.h\r
# End Source File\r
# Begin Source File\r
ExcludedFromBuild="TRUE"/>\r
</File>\r
<File\r
+ RelativePath="..\..\src\msw\datetimectrl.cpp">
+ <FileConfiguration
+ Name="Universal Debug|Win32"
+ ExcludedFromBuild="TRUE"/>
+ <FileConfiguration
+ Name="Universal Release|Win32"
+ ExcludedFromBuild="TRUE"/>
+ <FileConfiguration
+ Name="DLL Universal Debug|Win32"
+ ExcludedFromBuild="TRUE"/>
+ <FileConfiguration
+ Name="DLL Universal Release|Win32"
+ ExcludedFromBuild="TRUE"/>
+ </File>
+ <File
RelativePath="..\..\src\msw\hyperlink.cpp">\r
<FileConfiguration\r
Name="Universal Debug|Win32"\r
RelativePath="..\..\include\wx\msw\datectrl.h">\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\msw\datetimectrl.h">
+ </File>
+ <File
RelativePath="..\..\include\wx\msw\genrcdefs.h">\r
<FileConfiguration\r
Name="Debug|Win32">\r
RelativePath="..\..\include\wx\msw\datectrl.h">\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\msw\datetimectrl.h">
+ </File>
+ <File
RelativePath="..\..\include\wx\msw\dc.h">\r
</File>\r
<File\r
/>\r
</File>\r
<File\r
+ RelativePath="..\..\src\msw\datetimectrl.cpp"
+ >
+ <FileConfiguration
+ Name="Universal Debug|Win32"
+ ExcludedFromBuild="true"
+ />
+ <FileConfiguration
+ Name="Universal Release|Win32"
+ ExcludedFromBuild="true"
+ />
+ <FileConfiguration
+ Name="DLL Universal Debug|Win32"
+ ExcludedFromBuild="true"
+ />
+ <FileConfiguration
+ Name="DLL Universal Release|Win32"
+ ExcludedFromBuild="true"
+ />
+ </File>
+ <File
RelativePath="..\..\src\msw\hyperlink.cpp"\r
>\r
<FileConfiguration\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\msw\datetimectrl.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\msw\genrcdefs.h"\r
>\r
<FileConfiguration\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\msw\datetimectrl.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\msw\dc.h"\r
>\r
</File>\r
/>\r
</File>\r
<File\r
+ RelativePath="..\..\src\msw\datetimectrl.cpp"
+ >
+ <FileConfiguration
+ Name="Universal Debug|Win32"
+ ExcludedFromBuild="true"
+ />
+ <FileConfiguration
+ Name="Universal Release|Win32"
+ ExcludedFromBuild="true"
+ />
+ <FileConfiguration
+ Name="DLL Universal Debug|Win32"
+ ExcludedFromBuild="true"
+ />
+ <FileConfiguration
+ Name="DLL Universal Release|Win32"
+ ExcludedFromBuild="true"
+ />
+ </File>
+ <File
RelativePath="..\..\src\msw\hyperlink.cpp"\r
>\r
<FileConfiguration\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\msw\datetimectrl.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\msw\genrcdefs.h"\r
>\r
<FileConfiguration\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\msw\datetimectrl.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\msw\dc.h"\r
>\r
</File>\r
#if wxUSE_DATEPICKCTRL
-#include "wx/control.h" // the base class
-#include "wx/datetime.h"
+#include "wx/datetimectrl.h" // the base class
#define wxDatePickerCtrlNameStr wxT("datectrl")
// wxDatePickerCtrl: allow the user to enter the date
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxControl
+class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxDateTimePickerCtrl
{
public:
/*
const wxString& name = wxDatePickerCtrlNameStr);
*/
- // set/get the date
- virtual void SetValue(const wxDateTime& dt) = 0;
- virtual wxDateTime GetValue() const = 0;
+ /*
+ We inherit the methods to set/get the date from the base class.
+
+ virtual void SetValue(const wxDateTime& dt) = 0;
+ virtual wxDateTime GetValue() const = 0;
+ */
- // set/get the allowed valid range for the dates, if either/both of them
- // are invalid, there is no corresponding limit and if neither is set
- // GetRange() returns false
+ // And add methods to set/get the allowed valid range for the dates. If
+ // either/both of them are invalid, there is no corresponding limit and if
+ // neither is set, GetRange() returns false.
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
};
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/timectrl.h
+// Purpose: Declaration of wxDateTimePickerCtrl class.
+// Author: Vadim Zeitlin
+// Created: 2011-09-22
+// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
+// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DATETIME_CTRL_H_
+#define _WX_DATETIME_CTRL_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_DATEPICKCTRL
+
+#define wxNEEDS_DATETIMEPICKCTRL
+
+#include "wx/control.h" // the base class
+
+#include "wx/datetime.h"
+
+// ----------------------------------------------------------------------------
+// wxDateTimePickerCtrl: Private common base class of wx{Date,Time}PickerCtrl.
+// ----------------------------------------------------------------------------
+
+// This class is an implementation detail and should not be used directly, only
+// use the documented API of wxDateTimePickerCtrl and wxTimePickerCtrl.
+class WXDLLIMPEXP_ADV wxDateTimePickerCtrlBase : public wxControl
+{
+public:
+ // Set/get the date or time (in the latter case, time part is ignored).
+ virtual void SetValue(const wxDateTime& dt) = 0;
+ virtual wxDateTime GetValue() const = 0;
+};
+
+// Only MSW currently has any code to share between wxDatePickerCtrl and
+// wxTimePickerCtrl, under the other platforms this class is trivial.
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+ #include "wx/msw/datetimectrl.h"
+#else
+ typedef wxDateTimePickerCtrlBase wxDateTimePickerCtrl;
+#endif
+
+#endif // wxUSE_DATEPICKCTRL
+
+#endif // _WX_DATETIME_CTRL_H_
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDatePickerCtrlNameStr);
- // set/get the date
+ // Override this one to add date-specific (and time-ignoring) checks.
virtual void SetValue(const wxDateTime& dt);
virtual wxDateTime GetValue() const;
- // set/get the allowed valid range for the dates, if either/both of them
- // are invalid, there is no corresponding limit and if neither is set
- // GetRange() returns false
+ // Implement the base class pure virtuals.
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
+ // Override MSW-specific functions used during control creation.
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
- virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
-
- // returns true if the platform should explicitly apply a theme border
- virtual bool CanApplyThemeBorder() const { return false; }
-
protected:
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
- virtual wxSize DoGetBestSize() const;
-
- // the date currently shown by the control, may be invalid
- wxDateTime m_date;
-
+ virtual wxLocaleInfo MSWGetFormat() const;
+ virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); }
+ virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
};
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/msw/datetimectrl.h
+// Purpose: wxDateTimePickerCtrl for Windows.
+// Author: Vadim Zeitlin
+// Created: 2011-09-22 (extracted from wx/msw/datectrl.h).
+// RCS-ID: $Id$
+// Copyright: (c) 2005-2011 Vadim Zeitlin <vadim@wxwindows.org>
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_MSW_DATETIMECTRL_H_
+#define _WX_MSW_DATETIMECTRL_H_
+
+#include "wx/intl.h"
+
+// Forward declare a struct from Platform SDK.
+struct tagNMDATETIMECHANGE;
+
+// ----------------------------------------------------------------------------
+// wxDateTimePickerCtrl
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDateTimePickerCtrl : public wxDateTimePickerCtrlBase
+{
+public:
+ // set/get the date
+ virtual void SetValue(const wxDateTime& dt);
+ virtual wxDateTime GetValue() const;
+
+ // returns true if the platform should explicitly apply a theme border
+ virtual bool CanApplyThemeBorder() const { return false; }
+
+ virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
+
+protected:
+ virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
+ virtual wxSize DoGetBestSize() const;
+
+ // Helper for the derived classes Create(): creates a native control with
+ // the specified attributes.
+ bool MSWCreateDateTimePicker(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& dt,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator,
+ const wxString& name);
+
+ // Override to return the date/time format used by this control.
+ virtual wxLocaleInfo MSWGetFormat() const = 0;
+
+ // Override to indicate whether we can have no date at all.
+ virtual bool MSWAllowsNone() const = 0;
+
+ // Override to update m_date and send the event when the control contents
+ // changes, return true if the event was handled.
+ virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch) = 0;
+
+
+ // the date currently shown by the control, may be invalid
+ wxDateTime m_date;
+};
+
+#endif // _WX_MSW_DATETIMECTRL_H_
#endif
#include "wx/datectrl.h"
-
-#include "wx/msw/private/datecontrols.h"
-
#include "wx/dateevt.h"
-// apparently some versions of mingw define these macros erroneously
-#ifndef DateTime_GetSystemtime
- #define DateTime_GetSystemtime DateTime_GetSystemTime
-#endif
-
-#ifndef DateTime_SetSystemtime
- #define DateTime_SetSystemtime DateTime_SetSystemTime
-#endif
-
IMPLEMENT_DYNAMIC_CLASS(wxDatePickerCtrl, wxControl)
// ============================================================================
const wxValidator& validator,
const wxString& name)
{
- if ( !wxMSWDateControls::CheckInitialization() )
- return false;
-
// use wxDP_SPIN if wxDP_DEFAULT (0) was given as style
if ( !(style & wxDP_DROPDOWN) )
style |= wxDP_SPIN;
- // initialize the base class
- if ( !CreateControl(parent, id, pos, size, style, validator, name) )
- return false;
-
- // create the native control
- if ( !MSWCreateControl(DATETIMEPICK_CLASS, wxEmptyString, pos, size) )
- return false;
-
- if ( dt.IsValid() || (style & wxDP_ALLOWNONE) )
- SetValue(dt);
- else
- SetValue(wxDateTime::Today());
-
- return true;
+ return MSWCreateDateTimePicker(parent, id, dt,
+ pos, size, style,
+ validator, name);
}
WXDWORD wxDatePickerCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
// TODO: handle WM_WININICHANGE
-// ----------------------------------------------------------------------------
-// wxDatePickerCtrl geometry
-// ----------------------------------------------------------------------------
-
-wxSize wxDatePickerCtrl::DoGetBestSize() const
+wxLocaleInfo wxDatePickerCtrl::MSWGetFormat() const
{
- wxClientDC dc(const_cast<wxDatePickerCtrl *>(this));
-
- // we can't use FormatDate() here as the CRT doesn't always use the same
- // format as the date picker control
- wxString s;
- for ( int len = 100; ; len *= 2 )
- {
- if ( ::GetDateFormat
- (
- LOCALE_USER_DEFAULT, // the control should use the same
- DATE_SHORTDATE, // the format used by the control
- NULL, // use current date (we don't care)
- NULL, // no custom format
- wxStringBuffer(s, len), // output buffer
- len // and its length
- ) )
- {
- // success
- break;
- }
-
- const DWORD rc = ::GetLastError();
- if ( rc != ERROR_INSUFFICIENT_BUFFER )
- {
- wxLogApiError(wxT("GetDateFormat"), rc);
-
- // fall back on wxDateTime, what else to do?
- s = wxDateTime::Today().FormatDate();
- break;
- }
- }
-
- // the best size for the control is bigger than just the string
- // representation of todays date because the control must accommodate any
- // date and while the widths of all digits are usually about the same, the
- // width of the month string varies a lot, so try to account for it
- s += wxT("WW");
-
- int x, y;
- dc.GetTextExtent(s, &x, &y);
-
- // account for the drop-down arrow or spin arrows
- x += wxSystemSettings::GetMetric(wxSYS_HSCROLL_ARROW_X);
-
- // and for the checkbox if we have it
- if ( HasFlag(wxDP_ALLOWNONE) )
- x += 3*GetCharWidth();
-
- wxSize best(x, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
- CacheBestSize(best);
- return best;
+ return wxLOCALE_SHORT_DATE_FMT;
}
// ----------------------------------------------------------------------------
void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
{
- wxCHECK_RET( dt.IsValid() || HasFlag(wxDP_ALLOWNONE),
- wxT("this control requires a valid date") );
-
- SYSTEMTIME st;
if ( dt.IsValid() )
{
// Don't try setting the date if it's out of range: calendar control
// out of range value simply doing nothing -- so don't.
return;
}
-
- dt.GetAsMSWSysTime(&st);
}
- if ( !DateTime_SetSystemtime(GetHwnd(),
- dt.IsValid() ? GDT_VALID : GDT_NONE,
- &st) )
- {
- // The only expected failure is when the date is out of range but we
- // already checked for this above.
- wxFAIL_MSG( wxT("Setting the calendar date unexpectedly failed.") );
-
- // In any case, skip updating m_date below.
- return;
- }
+ wxDateTimePickerCtrl::SetValue(dt);
// we need to keep only the date part, times don't make sense for this
// control (in particular, comparisons with other dates would fail)
- m_date = dt;
if ( m_date.IsValid() )
m_date.ResetTime();
}
wxASSERT_MSG( m_date.IsValid() == dt.IsValid() &&
(!dt.IsValid() || dt == m_date),
- wxT("bug in wxDatePickerCtrl: m_date not in sync") );
+ wxT("bug in wxDateTimePickerCtrl: m_date not in sync") );
#endif // wxDEBUG_LEVEL
- return m_date;
+ return wxDateTimePickerCtrl::GetValue();
}
void wxDatePickerCtrl::SetRange(const wxDateTime& dt1, const wxDateTime& dt2)
// wxDatePickerCtrl events
// ----------------------------------------------------------------------------
-bool
-wxDatePickerCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
+bool wxDatePickerCtrl::MSWOnDateTimeChange(const NMDATETIMECHANGE& dtch)
{
- NMHDR* hdr = (NMHDR *)lParam;
- switch ( hdr->code )
- {
- case DTN_DATETIMECHANGE:
- {
- NMDATETIMECHANGE *dtch = (NMDATETIMECHANGE *)hdr;
- wxDateTime dt;
- if ( dtch->dwFlags == GDT_VALID )
- dt.SetFromMSWSysDate(dtch->st);
-
- // filter out duplicate DTN_DATETIMECHANGE events which the native
- // control sends us when using wxDP_DROPDOWN style
- if ( (m_date.IsValid() != dt.IsValid()) ||
- (m_date.IsValid() && dt != m_date) )
- {
- m_date = dt;
- wxDateEvent event(this, dt, wxEVT_DATE_CHANGED);
- if ( HandleWindowEvent(event) )
- {
- *result = 0;
- return true;
- }
- }
- //else: both the old and new values are invalid, nothing changed
- }
- }
+ wxDateTime dt;
+ if ( dtch.dwFlags == GDT_VALID )
+ dt.SetFromMSWSysDate(dtch.st);
- return wxDatePickerCtrlBase::MSWOnNotify(idCtrl, lParam, result);
+ // filter out duplicate DTN_DATETIMECHANGE events which the native
+ // control sends us when using wxDP_DROPDOWN style
+ if ( (m_date.IsValid() == dt.IsValid()) &&
+ (!m_date.IsValid() || dt == m_date) )
+ return false;
+
+ m_date = dt;
+ wxDateEvent event(this, dt, wxEVT_DATE_CHANGED);
+ return HandleWindowEvent(event);
}
#endif // wxUSE_DATEPICKCTRL
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: src/msw/datetimectrl.cpp
+// Purpose: Implementation of wxDateTimePickerCtrl for MSW.
+// Author: Vadim Zeitlin
+// Created: 2011-09-22 (extracted from src/msw/datectrl.cpp)
+// RCS-ID: $Id: wxhead.cpp,v 1.11 2010-04-22 12:44:51 zeitlin Exp $
+// Copyright: (c) 2005-2011 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "wx/datetimectrl.h"
+
+#ifdef wxNEEDS_DATETIMEPICKCTRL
+
+#ifndef WX_PRECOMP
+#endif // WX_PRECOMP
+
+#include "wx/msw/private/datecontrols.h"
+
+// apparently some versions of mingw define these macros erroneously
+#ifndef DateTime_GetSystemtime
+ #define DateTime_GetSystemtime DateTime_GetSystemTime
+#endif
+
+#ifndef DateTime_SetSystemtime
+ #define DateTime_SetSystemtime DateTime_SetSystemTime
+#endif
+
+// ============================================================================
+// wxDateTimePickerCtrl implementation
+// ============================================================================
+
+bool
+wxDateTimePickerCtrl::MSWCreateDateTimePicker(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& dt,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ if ( !wxMSWDateControls::CheckInitialization() )
+ return false;
+
+ // initialize the base class
+ if ( !CreateControl(parent, id, pos, size, style, validator, name) )
+ return false;
+
+ // create the native control
+ if ( !MSWCreateControl(DATETIMEPICK_CLASS, wxString(), pos, size) )
+ return false;
+
+ if ( dt.IsValid() || MSWAllowsNone() )
+ SetValue(dt);
+ else
+ SetValue(wxDateTime::Now());
+
+ return true;
+}
+
+void wxDateTimePickerCtrl::SetValue(const wxDateTime& dt)
+{
+ wxCHECK_RET( dt.IsValid() || MSWAllowsNone(),
+ wxT("this control requires a valid date") );
+
+ SYSTEMTIME st;
+ if ( dt.IsValid() )
+ dt.GetAsMSWSysTime(&st);
+
+ if ( !DateTime_SetSystemtime(GetHwnd(),
+ dt.IsValid() ? GDT_VALID : GDT_NONE,
+ &st) )
+ {
+ // The only expected failure is when the date is out of range but we
+ // already checked for this above.
+ wxFAIL_MSG( wxT("Setting the calendar date unexpectedly failed.") );
+
+ // In any case, skip updating m_date below.
+ return;
+ }
+
+ m_date = dt;
+}
+
+wxDateTime wxDateTimePickerCtrl::GetValue() const
+{
+ return m_date;
+}
+
+wxSize wxDateTimePickerCtrl::DoGetBestSize() const
+{
+ wxClientDC dc(const_cast<wxDateTimePickerCtrl *>(this));
+
+ // Use the same native format as this as the underlying native control.
+ wxString s = wxDateTime::Now().Format(wxLocale::GetInfo(MSWGetFormat()));
+
+ // the best size for the control is bigger than just the string
+ // representation of the current value because the control must accommodate
+ // any date and while the widths of all digits are usually about the same,
+ // the width of the month string varies a lot, so try to account for it
+ s += wxT("WW");
+
+ int x, y;
+ dc.GetTextExtent(s, &x, &y);
+
+ // account for the drop-down arrow or spin arrows
+ x += wxSystemSettings::GetMetric(wxSYS_HSCROLL_ARROW_X);
+
+ // and for the checkbox if we have it
+ if ( MSWAllowsNone() )
+ x += 3*GetCharWidth();
+
+ wxSize best(x, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
+ CacheBestSize(best);
+ return best;
+}
+
+bool
+wxDateTimePickerCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
+{
+ NMHDR* hdr = (NMHDR *)lParam;
+ switch ( hdr->code )
+ {
+ case DTN_DATETIMECHANGE:
+ if ( MSWOnDateTimeChange(*(NMDATETIMECHANGE*)(hdr)) )
+ {
+ *result = 0;
+ return true;
+ }
+ break;
+ }
+
+ return wxDateTimePickerCtrlBase::MSWOnNotify(idCtrl, lParam, result);
+}
+
+#endif // wxNEEDS_DATETIMEPICKCTRL