X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3b466481eac25cbef1d35aaf6ee9d94167a07b9..84bdb0d8d7d7fe3d7cd6a2e5f50ee247ce2af5df:/src/msw/penwin.cpp diff --git a/src/msw/penwin.cpp b/src/msw/penwin.cpp index 340c175dc8..ec3a6fccbb 100644 --- a/src/msw/penwin.cpp +++ b/src/msw/penwin.cpp @@ -5,11 +5,11 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation #endif @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/setup.h" +#include "wx/window.h" #endif #include "wx/msw/private.h" @@ -41,7 +42,7 @@ typedef void (CALLBACK * PENREGPROC)(WORD,BOOL); // support Pen input when running under Microsoft Windows for // Pen Computing 1.0 without need of the PenPalete. // -// Should masked edit functions be added to wxWindows we would +// Should masked edit functions be added to wxWidgets we would // be a new class of functions to support BEDIT controls. // // (The function is a NOOP for native Windows-NT) @@ -56,32 +57,32 @@ void wxEnablePenAppHooks (bool hook) if (hook) { if (g_hPenWin) - return; + return; /////////////////////////////////////////////////////////////////////// // If running on a Pen Windows system, register this app so all // EDIT controls in dialogs are replaced by HEDIT controls. - if ((g_hPenWin = (HANDLE)GetSystemMetrics (SM_PENWINDOWS)) != (HANDLE) NULL) - { - // We do this fancy GetProcAddress simply because we don't - // know if we're running Pen Windows. - if ((RegPenApp = (PENREGPROC)GetProcAddress (g_hPenWin, "RegisterPenApp")) != NULL) - (*RegPenApp) (RPA_DEFAULT, TRUE); - } + if ((g_hPenWin = (HANDLE)::GetSystemMetrics (SM_PENWINDOWS)) != (HANDLE) NULL) + { + // We do this fancy GetProcAddress simply because we don't + // know if we're running Pen Windows. + if ((RegPenApp = (PENREGPROC)GetProcAddress (g_hPenWin, "RegisterPenApp")) != NULL) + (*RegPenApp) (RPA_DEFAULT, TRUE); + } } else { /////////////////////////////////////////////////////////////////////// // If running on a Pen Windows system, unregister if (g_hPenWin) - { - // Unregister this app - if (RegPenApp != NULL) - (*RegPenApp) (RPA_DEFAULT, FALSE); - g_hPenWin = (HANDLE) NULL; - } + { + // Unregister this app + if (RegPenApp != NULL) + (*RegPenApp) (RPA_DEFAULT, FALSE); + g_hPenWin = (HANDLE) NULL; + } } -#endif /* ! Windows-NT */ +#endif /* ! Windows-NT */ } #endif @@ -96,7 +97,7 @@ void wxRegisterPenWin(void) // (Notice the CONTROL statement in the RC file is "EDIT", // RegisterPenApp will automatically change that control to // an HEDIT. - if ((g_hPenWin = (HANDLE)GetSystemMetrics(SM_PENWINDOWS)) != (HANDLE)NULL) { + if ((g_hPenWin = (HANDLE)::GetSystemMetrics(SM_PENWINDOWS)) != (HANDLE)NULL) { // We do this fancy GetProcAddress simply because we don't // know if we're running Pen Windows. if ( (RegPenApp = (void (CALLBACK *)(WORD, BOOL))GetProcAddress(g_hPenWin, "RegisterPenApp"))!= NULL) @@ -112,7 +113,7 @@ void wxCleanUpPenWin(void) if (g_hPenWin) { // Unregister this app if (RegPenApp != NULL) - (*RegPenApp)(RPA_DEFAULT, FALSE); + (*RegPenApp)(RPA_DEFAULT, FALSE); } #endif }