Add guard over wxMSWDateControls
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "wx/msw/wrapwin.h"
|
#include "wx/msw/wrapwin.h"
|
||||||
|
|
||||||
|
#if wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
|
||||||
// namespace for the helper functions related to the date controls
|
// namespace for the helper functions related to the date controls
|
||||||
namespace wxMSWDateControls
|
namespace wxMSWDateControls
|
||||||
{
|
{
|
||||||
@@ -24,6 +25,7 @@ namespace wxMSWDateControls
|
|||||||
extern bool CheckInitialization();
|
extern bool CheckInitialization();
|
||||||
|
|
||||||
} // namespace wxMSWDateControls
|
} // namespace wxMSWDateControls
|
||||||
|
#endif // wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
|
||||||
|
|
||||||
#endif // _MSW_PRIVATE_DATECONTROLS_H_
|
#endif // _MSW_PRIVATE_DATECONTROLS_H_
|
||||||
|
|
||||||
|
@@ -62,8 +62,10 @@ wxDateTimePickerCtrl::MSWCreateDateTimePicker(wxWindow *parent,
|
|||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
|
||||||
if ( !wxMSWDateControls::CheckInitialization() )
|
if ( !wxMSWDateControls::CheckInitialization() )
|
||||||
return false;
|
return false;
|
||||||
|
#endif // wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
|
||||||
|
|
||||||
// initialize the base class
|
// initialize the base class
|
||||||
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
||||||
|
Reference in New Issue
Block a user