typedef void (CALLBACK * PENREGPROC)(WORD,BOOL);
// The routine below allows Windows applications (binaries) to
// support Pen input when running under Microsoft Windows for
// Pen Computing 1.0 without need of the PenPalete.
//
typedef void (CALLBACK * PENREGPROC)(WORD,BOOL);
// The routine below allows Windows applications (binaries) to
// support Pen input when running under Microsoft Windows for
// Pen Computing 1.0 without need of the PenPalete.
//
// be a new class of functions to support BEDIT controls.
//
// (The function is a NOOP for native Windows-NT)
// be a new class of functions to support BEDIT controls.
//
// (The function is a NOOP for native Windows-NT)
///////////////////////////////////////////////////////////////////////
// If running on a Pen Windows system, register this app so all
// EDIT controls in dialogs are replaced by HEDIT controls.
///////////////////////////////////////////////////////////////////////
// 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)
- {
- // 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)
- (*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
}
else
{
///////////////////////////////////////////////////////////////////////
// If running on a Pen Windows system, unregister
- if (s_hPenWin)
- {
- // Unregister this app
- if (RegPenApp != NULL)
- (*RegPenApp) (RPA_DEFAULT, FALSE);
- s_hPenWin = (HANDLE) NULL;
- }
+ if (g_hPenWin)
+ {
+ // Unregister this app
+ if (RegPenApp != NULL)
+ (*RegPenApp) (RPA_DEFAULT, FALSE);
+ g_hPenWin = (HANDLE) NULL;
+ }
///////////////////////////////////////////////////////////////////////
// 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 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 ( (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);
}
///////////////////////////////////////////////////////////////////////
(*RegPenApp)(RPA_DEFAULT, TRUE);
}
///////////////////////////////////////////////////////////////////////