X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..697c314b162ff4758db0047e548d5401994d2c70:/src/msw/penwin.cpp diff --git a/src/msw/penwin.cpp b/src/msw/penwin.cpp index 3cc52941fd..2295b2665c 100644 --- a/src/msw/penwin.cpp +++ b/src/msw/penwin.cpp @@ -1,18 +1,14 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: penwin.cpp +// Name: src/msw/penwin.cpp // Purpose: PenWindows code // Author: Julian Smart // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -21,8 +17,7 @@ #endif #ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/window.h" + #include "wx/window.h" #endif #include "wx/msw/private.h" @@ -57,32 +52,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 @@ -97,7 +92,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) @@ -113,8 +108,7 @@ void wxCleanUpPenWin(void) if (g_hPenWin) { // Unregister this app if (RegPenApp != NULL) - (*RegPenApp)(RPA_DEFAULT, FALSE); + (*RegPenApp)(RPA_DEFAULT, FALSE); } #endif } -