This keyword is not expanded by Git which means it's not replaced with the correct revision value in the releases made using git-based scripts and it's confusing to have lines with unexpanded "$Id$" in the released files. As expanding them with Git is not that simple (it could be done with git archive and export-subst attribute) and there are not many benefits in having them in the first place, just remove all these lines. If nothing else, this will make an eventual transition to Git simpler. Closes #14487. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
91 lines
3.0 KiB
C++
91 lines
3.0 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/msw/datecontrols.cpp
|
|
// Purpose: implementation of date controls helper functions
|
|
// Author: Vadim Zeitlin
|
|
// Created: 2008-04-04
|
|
// Copyright: (c) 2008 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
|
|
|
|
#ifndef WX_PRECOMP
|
|
#include "wx/app.h"
|
|
#include "wx/msw/wrapcctl.h"
|
|
#endif // WX_PRECOMP
|
|
|
|
#if wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
|
|
|
|
#include "wx/msw/private/datecontrols.h"
|
|
|
|
#include "wx/dynlib.h"
|
|
|
|
// ============================================================================
|
|
// implementation
|
|
// ============================================================================
|
|
|
|
bool wxMSWDateControls::CheckInitialization()
|
|
{
|
|
// although we already call InitCommonControls() in app.cpp which is
|
|
// supposed to initialize all common controls, in comctl32.dll 4.72 (and
|
|
// presumably earlier versions 4.70 and 4.71, date time picker not being
|
|
// supported in < 4.70 anyhow) it does not do it and we have to initialize
|
|
// it explicitly
|
|
|
|
// this is initially set to -1 to indicate that we need to perform the
|
|
// initialization and gets set to false or true depending on its result
|
|
static int s_initResult = -1; // MT-ok: used from GUI thread only
|
|
if ( s_initResult == -1 )
|
|
{
|
|
// in any case do nothing the next time, the result won't change and
|
|
// it's enough to give the error only once
|
|
s_initResult = false;
|
|
|
|
if ( wxApp::GetComCtl32Version() < 470 )
|
|
{
|
|
wxLogError(_("This system doesn't support date controls, please upgrade your version of comctl32.dll"));
|
|
|
|
return false;
|
|
}
|
|
|
|
#if wxUSE_DYNLIB_CLASS
|
|
INITCOMMONCONTROLSEX icex;
|
|
icex.dwSize = sizeof(icex);
|
|
icex.dwICC = ICC_DATE_CLASSES;
|
|
|
|
// see comment in wxApp::GetComCtl32Version() explaining the
|
|
// use of wxLoadedDLL
|
|
wxLoadedDLL dllComCtl32(wxT("comctl32.dll"));
|
|
if ( dllComCtl32.IsLoaded() )
|
|
{
|
|
wxLogNull noLog;
|
|
|
|
typedef BOOL (WINAPI *ICCEx_t)(INITCOMMONCONTROLSEX *);
|
|
wxDYNLIB_FUNCTION( ICCEx_t, InitCommonControlsEx, dllComCtl32 );
|
|
|
|
if ( pfnInitCommonControlsEx )
|
|
{
|
|
s_initResult = (*pfnInitCommonControlsEx)(&icex);
|
|
}
|
|
}
|
|
#endif // wxUSE_DYNLIB_CLASS
|
|
}
|
|
|
|
return s_initResult != 0;
|
|
}
|
|
|
|
#endif // wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
|