X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa06b433fc7ed4137d7fe5195cbbec88a10291af..8f2c3ee9a0fb0457f81f4d70ad0077bf092b8a6a:/src/msw/caret.cpp diff --git a/src/msw/caret.cpp b/src/msw/caret.cpp index ee761165a1..2051e526a9 100644 --- a/src/msw/caret.cpp +++ b/src/msw/caret.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 23.05.99 // RCS-ID: $Id$ -// Copyright: (c) wxWindows team +// Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -17,7 +17,7 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "caret.h" #endif @@ -35,21 +35,17 @@ #include "wx/caret.h" +#if wxUSE_CARET + #include "wx/msw/private.h" // --------------------------------------------------------------------------- // macros // --------------------------------------------------------------------------- -// under Win16 the caret APIs are void but under Win32 they may return an -// error code which we want to check - this macro does just this -#ifdef __WIN16__ - #define CALL_CARET_API(api, args) api args -#else // Win32 - #define CALL_CARET_API(api, args) \ +#define CALL_CARET_API(api, args) \ if ( !api args ) \ wxLogLastError(_T(#api)) -#endif // Win16/32 // =========================================================================== // implementation @@ -91,7 +87,7 @@ bool wxCaret::MSWCreateCaret() CALL_CARET_API(CreateCaret, (GetWinHwnd(GetWindow()), 0, m_width, m_height)); - m_hasCaret = TRUE; + m_hasCaret = true; } return m_hasCaret; @@ -117,7 +113,7 @@ void wxCaret::OnKillFocus() { if ( m_hasCaret ) { - m_hasCaret = FALSE; + m_hasCaret = false; CALL_CARET_API(DestroyCaret, ()); } @@ -186,9 +182,11 @@ void wxCaret::DoSize() { if ( m_hasCaret ) { - m_hasCaret = FALSE; + m_hasCaret = false; CALL_CARET_API(DestroyCaret, ()); MSWCreateCaret(); OnSetFocus(); } } + +#endif