X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..a6b0bd49c72e577a218bfe10fc1526cf2ad6293d:/src/msw/penwin.cpp

diff --git a/src/msw/penwin.cpp b/src/msw/penwin.cpp
index 6fca0c5cda..340c175dc8 100644
--- a/src/msw/penwin.cpp
+++ b/src/msw/penwin.cpp
@@ -14,10 +14,9 @@
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
-#define IN_WX_MAIN_CPP
 #include "wx/wxprec.h"
 
-#if defined(__BORLANDC__)
+#ifdef __BORLANDC__
 #pragma hdrstop
 #endif
 
@@ -27,7 +26,7 @@
 
 #include "wx/msw/private.h"
 
-#if USE_PENWINDOWS
+#if wxUSE_PENWINDOWS
 
 #ifdef __BORLANDC__
 #define RPA_DEFAULT 1
@@ -35,7 +34,7 @@
 #include <penwin.h>
 #endif
 
-HANDLE s_hPenWin = (HANDLE)NULL;
+HANDLE g_hPenWin = (HANDLE)NULL;
 typedef void (CALLBACK * PENREGPROC)(WORD,BOOL);
 
 // The routine below allows Windows applications (binaries) to
@@ -56,17 +55,17 @@ void wxEnablePenAppHooks (bool hook)
 #ifndef __WIN32__
   if (hook)
     {
-      if (s_hPenWin)
+      if (g_hPenWin)
 	return;
 
       ///////////////////////////////////////////////////////////////////////
       // If running on a Pen Windows system, register this app so all
       // EDIT controls in dialogs are replaced by HEDIT controls.
-      if ((s_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 = (PENREGPROC)GetProcAddress (s_hPenWin, "RegisterPenApp")) != NULL)
+	  if ((RegPenApp = (PENREGPROC)GetProcAddress (g_hPenWin, "RegisterPenApp")) != NULL)
 	    (*RegPenApp) (RPA_DEFAULT, TRUE);
 	}
     }
@@ -74,33 +73,33 @@ void wxEnablePenAppHooks (bool hook)
     {
       ///////////////////////////////////////////////////////////////////////
       // If running on a Pen Windows system, unregister
-      if (s_hPenWin)
+      if (g_hPenWin)
 	{
 	  // Unregister this app 
 	  if (RegPenApp != NULL)
 	    (*RegPenApp) (RPA_DEFAULT, FALSE);
-	  s_hPenWin = (HANDLE) NULL;
+	  g_hPenWin = (HANDLE) NULL;
 	}
     }
 #endif	/* ! Windows-NT */
 }
 
 #endif
-  // End USE_PENWINDOWS
+  // End wxUSE_PENWINDOWS
 
 void wxRegisterPenWin(void)
 {
-#if USE_PENWINDOWS
+#if wxUSE_PENWINDOWS
 ///////////////////////////////////////////////////////////////////////
 // If running on a Pen Windows system, register this app so all
 // EDIT controls in dialogs are replaced by HEDIT controls.
 // (Notice the CONTROL statement in the RC file is "EDIT",
 // RegisterPenApp will automatically change that control to
 // an HEDIT.
-  if ((s_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(s_hPenWin, "RegisterPenApp"))!= NULL)
+   if ( (RegPenApp = (void (CALLBACK *)(WORD, BOOL))GetProcAddress(g_hPenWin, "RegisterPenApp"))!= NULL)
      (*RegPenApp)(RPA_DEFAULT, TRUE);
   }
 ///////////////////////////////////////////////////////////////////////
@@ -109,9 +108,9 @@ void wxRegisterPenWin(void)
 
 void wxCleanUpPenWin(void)
 {
-#if USE_PENWINDOWS
-  if (s_hPenWin) {
-    // Unregister this app 
+#if wxUSE_PENWINDOWS
+  if (g_hPenWin) {
+    // Unregister this app
     if (RegPenApp != NULL)
 	(*RegPenApp)(RPA_DEFAULT, FALSE);
   }