This commit is contained in:
nephacks
2025-06-04 03:22:50 +02:00
parent f234f23848
commit f12416cffd
14243 changed files with 6446499 additions and 26 deletions

View File

@@ -0,0 +1,58 @@
#include <windows.h>
/* test_bitboxes() - use a static text box for selecting/changing a list of bits, hex bytes,
or other evenly spaced things. */
/* scrPos.x = x coord */
/* scrPos.y = y coord */
/* box_id = an array of dialog ID's, one for each box */
/* ndiv = number of divisions per box */
/* nboxes = number of boxes */
/* return value = selection number or -1 if point is outside of all boxes */
int
test_bitboxes( HWND hDlg, unsigned long pos, unsigned ndiv, int nboxes, const int *box_id )
{
int i;
POINT scrPos;
/* find current position in screen coordinates. */
scrPos.x = (int)LOWORD(pos);
scrPos.y = (int)HIWORD(pos);
ClientToScreen(hDlg, &scrPos);
for( i = 0; i < nboxes; i++ ) {
RECT box;
HWND hWndItem;
HDC hDC;
static char buf[100];
/* Check point against bounding box of text box */
hWndItem = GetDlgItem(hDlg, box_id[i]);
GetWindowRect(hWndItem, &box);
GetWindowText(hWndItem, buf, sizeof(buf));
hDC = GetDC(hWndItem);
if (hDC) {
SIZE stringSize;
GetTextExtentPoint(hDC, buf, strlen(buf), &stringSize);
// heuristic rule: sometimes GetTextExtentPoint lies
// when the font is manually reduced in size, say 70%.
// So, only believe the string size if it is smaller
// than the box size.
if (stringSize.cx < (box.right - box.left)) {
// now correct the right side of box for string size.
box.right=box.left + stringSize.cx;
}
ReleaseDC(hWndItem,hDC);
}
if( scrPos.x > box.left && scrPos.x < box.right &&
scrPos.y > box.top && scrPos.y < box.bottom ) {
/* Check which character the point is in */
return (ndiv*i + (ndiv*(scrPos.x - box.left)) / (box.right - box.left));
}
}
return -1;
}

View File

@@ -0,0 +1,176 @@
/****************************/
/* Set extended button maps */
/****************************/
#include <stdio.h>
#include <windows.h>
#include "wintab.h"
#include "mgrtest.h"
#include "resource.h"
typedef struct {
UINT wCsr;
BYTE sysBtns[256];
BYTE logBtns[256];
} xBtn_info;
static const unsigned nbitboxes = 32;
static const int bitbox_id[] = {
IDC_SYS_1, IDC_SYS_2, IDC_SYS_3, IDC_SYS_4, IDC_SYS_5, IDC_SYS_6, IDC_SYS_7, IDC_SYS_8, IDC_SYS_9, IDC_SYS_10, IDC_SYS_11, IDC_SYS_12, IDC_SYS_13, IDC_SYS_14, IDC_SYS_15, IDC_SYS_16,
IDC_LOG_1, IDC_LOG_2, IDC_LOG_3, IDC_LOG_4, IDC_LOG_5, IDC_LOG_6, IDC_LOG_7, IDC_LOG_8, IDC_LOG_9, IDC_LOG_10, IDC_LOG_11, IDC_LOG_12, IDC_LOG_13, IDC_LOG_14, IDC_LOG_15, IDC_LOG_16
};
extern HANDLE hInst;
void
display_xButton_info( HWND hDlg, const xBtn_info * btn )
{
unsigned i;
for( i = 0; i < nbitboxes; i++ ) {
unsigned j;
char buf[100] = "";
for( j = 0; j < 16; j++ ) {
char tmp[5];
sprintf( tmp, "%2x ", (int)*(btn->sysBtns + i*16 + j) );
strcat( buf, tmp );
}
SetWindowText(GetDlgItem(hDlg, bitbox_id[i]), buf);
}
}
BOOL
CALLBACK valueProc( HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam )
{
BOOL fResult;
int retval;
switch( Msg ) {
case WM_COMMAND:
switch( wParam ) {
case IDOK:
retval = GetDlgItemInt( hDlg, IDC_EDIT, 0, TRUE );
EndDialog(hDlg, retval);
fResult = TRUE;
break;
case IDCANCEL:
EndDialog(hDlg, -1);
fResult = TRUE;
break;
default:
fResult = FALSE;
}
break;
default:
fResult = FALSE;
}
return fResult;
}
BOOL
CALLBACK xButtonDlgProc( HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam )
{
static xBtn_info * btn;
int i;
BOOL fResult;
switch( Msg ) {
case WM_INITDIALOG:
btn = (xBtn_info *)lParam;
display_xButton_info( hDlg, btn );
fResult = TRUE;
break;
case WM_LBUTTONDOWN: /* Change the xBtn map */
i = test_bitboxes( hDlg, lParam, 16, nbitboxes, bitbox_id );
if( i > -1 ) {
FARPROC lpProcDlg;
int val;
/* Open 'Enter Value' dialog */
lpProcDlg = MakeProcInstance( valueProc, hInst );
val = DialogBox( hInst, MAKEINTRESOURCE(IDD_VALUE), hDlg, lpProcDlg );
FreeProcInstance( lpProcDlg );
if( val >= 0 && val <= 0xff ) {
*(btn->sysBtns + i) = val;
display_xButton_info( hDlg, btn );
} else
if( val != -1 )
MessageBox( hDlg, "Invalid value.", "MgrTest", MB_OK | MB_ICONHAND );
}
fResult = TRUE;
break;
case WM_COMMAND:
if (wParam == IDOK || wParam == IDCANCEL) {
EndDialog(hDlg, wParam);
fResult = TRUE;
} else
fResult = FALSE;
break;
default:
fResult = FALSE;
}
return fResult;
}
void
set_xBtnMap( HWND hWnd, HMGR hMgr )
{
FARPROC lpProcDlg;
xBtn_info info;
unsigned i;
int tag;
/* Open a dialog to choose which cursor to use. */
lpProcDlg = MakeProcInstance( CursInfoDlgProc, hInst );
info.wCsr = DialogBoxParam( hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hWnd, lpProcDlg, WTI_CURSORS );
FreeProcInstance( lpProcDlg );
if( info.wCsr != 0xffffffff ) {
/* Find xBtnMask info */
i = 0;
while( WTInfo( WTI_EXTENSIONS + i, EXT_TAG, &tag ) && tag != WTX_XBTNMASK )
i++;
if( tag != WTX_XBTNMASK )
MessageBox( hWnd, "XBTNMASK extension not supported.", "MgrTest", MB_ICONHAND | MB_OK );
/* Read the xBtn map info */
if( !WTInfo( WTI_EXTENSIONS + i, EXT_CURSORS + info.wCsr, info.sysBtns ) )
MessageBox( hWnd, "This cursor does not support XBTNMASK.", "MgrTest", MB_ICONHAND | MB_OK );
else {
int id;
/* Start the XBUTTONS dialog */
lpProcDlg = MakeProcInstance( xButtonDlgProc, hInst );
id = DialogBoxParam( hInst, MAKEINTRESOURCE(IDD_XBUTTONS),
hWnd, lpProcDlg, (long)&info );
FreeProcInstance( lpProcDlg );
if( id == IDOK )
if( !WTMgrCsrExt( hMgr, info.wCsr, WTX_XBTNMASK, info.sysBtns ) )
MessageBox( hWnd, "WTMgrCsrExt failed.", "MgrTest", MB_ICONHAND | MB_OK );
}
}
}

View File

@@ -0,0 +1,228 @@
/* -------------------------------------------------------------------------- */
/* Set the Button Mask and XBTNMASK extension */
/* -------------------------------------------------------------------------- */
#include <windows.h>
#include "wintab.h"
#include "Mgrdlg.h"
#include "Mgrtest.h"
#include "resource.h"
typedef struct {
LOGCONTEXT * lc;
BOOL xBtnMask_avail;
XBTNMASK xBtnMask;
} btn_info;
static const unsigned nbitboxes = 18;
static const int bitbox_id[] = {
XBU_DISPLAY1, XBU_DISPLAY2, XBU_DISPLAY3, XBU_DISPLAY4, XBU_DISPLAY5, XBU_DISPLAY6, XBU_DISPLAY7, XBU_DISPLAY8,
XBD_DISPLAY1, XBD_DISPLAY2, XBD_DISPLAY3, XBD_DISPLAY4, XBD_DISPLAY5, XBD_DISPLAY6, XBD_DISPLAY7, XBD_DISPLAY8,
BNU_DISPLAY, BND_DISPLAY
};
extern HANDLE hInst;
extern BOOL FAR PASCAL ButtonDlgProc(HWND, UINT, WPARAM, LPARAM);
void
static DisplayBits( HWND hDlg, const btn_info * btn )
{
static char buf[33];
int i;
buf[32] = 0;
/* Display the XBTNMASK bits */
for( i = 0; i < 8; i++ ) {
unsigned j;
for( j = 0; j < 32; j++ )
buf[j] = '0' + ((btn->xBtnMask.xBtnUpMask[4*i + j/8] >> (j%8)) & 0x01);
SetWindowText(GetDlgItem(hDlg, bitbox_id[i]), buf);
}
for( i = 8; i < 16; i++ ) {
unsigned j;
for( j = 0; j < 32; j++ )
buf[j] = '0' + ((btn->xBtnMask.xBtnDnMask[4*(i-8) + j/8] >> (j%8)) & 0x01);
SetWindowText(GetDlgItem(hDlg, bitbox_id[i]), buf);
}
/* Display the regular button mask bits */
for( i = 0; i < 32; i++ )
buf[i] = (char)('0' + ((btn->lc->lcBtnUpMask >> i) & 0x01));
SetWindowText(GetDlgItem(hDlg, BNU_DISPLAY), buf);
for( i = 0; i < 32; i++ )
buf[i] = (char)('0' + ((btn->lc->lcBtnDnMask >> i) & 0x01));
SetWindowText(GetDlgItem(hDlg, BND_DISPLAY), buf);
}
/* -------------------------------------------------------------------------- */
BOOL
CALLBACK BtnMaskDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam)
{
static btn_info * btn;
BOOL fResult;
int bit;
switch (Msg) {
case WM_INITDIALOG:
btn = (btn_info *)lParam;
if( !btn->xBtnMask_avail ) {
EnableWindow( GetDlgItem(hDlg, XBD_BOX), FALSE );
EnableWindow( GetDlgItem(hDlg, XBU_BOX), FALSE );
for( bit = 0; bit < 16; bit++ )
EnableWindow( GetDlgItem(hDlg, bitbox_id[bit]), FALSE );
}
DisplayBits(hDlg, btn);
break;
case WM_LBUTTONDOWN: /* Change the xBtnMask bits */
/* If clicked on a digit in ???_DISPLAY?, then change it's corrisponding bit */
/* Luckily 1 and 0 have the same width in the default font */
bit = test_bitboxes( hDlg, lParam, 32, nbitboxes, bitbox_id );
if( bit > -1 ) {
/* Flip the bit. The first 32 bits of XBTNMASK should match the regular
32 bit button mask */
if( bit/32 == 16 ) { /* Regular button mask */
btn->lc->lcBtnUpMask ^= 1 << (bit%32);
if( btn->xBtnMask_avail )
btn->xBtnMask.xBtnUpMask[(bit%32)/8] ^= 1 << (bit%32);
} else
if( bit/32 == 17 ) {
btn->lc->lcBtnDnMask ^= 1 << (bit%32);
if( btn->xBtnMask_avail )
btn->xBtnMask.xBtnDnMask[(bit%32)/8] ^= 1 << (bit%32);
} else /* xBtnMask */
if( btn->xBtnMask_avail )
if( bit >= 256 ) {
btn->xBtnMask.xBtnDnMask[(bit-256)/8] ^= 1 << (bit%8);
if( bit-256 < 32 )
btn->lc->lcBtnDnMask ^= 1 << (bit%32);
} else {
btn->xBtnMask.xBtnUpMask[bit / 8] ^= 1 << (bit%8);
if( bit < 32 )
btn->lc->lcBtnUpMask ^= 1 << (bit%32);
}
DisplayBits(hDlg, btn);
}
fResult = TRUE;
break;
case WM_COMMAND:
if (wParam == IDOK) {
EndDialog(hDlg, wParam);
fResult = TRUE;
}
else if (wParam == IDCANCEL) {
EndDialog(hDlg, wParam);
fResult = TRUE;
}
break;
default:
fResult = FALSE;
}
return fResult;
} /* BtnMaskDlgProc */
void
set_default_BtnMask( HWND hWnd, HMGR hMgr, int fSys )
{
int wDev;
FARPROC lpProcDlg;
/* Get a device # */
lpProcDlg = MakeProcInstance(CursInfoDlgProc, hWnd);
wDev = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hWnd, lpProcDlg, WTI_DDCTXS);
FreeProcInstance(lpProcDlg);
if( wDev >= 0 ) {
FARPROC fpProc;
btn_info btn;
HCTX hCtx;
int id;
unsigned numDevices;
LOGCONTEXT lc;
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &numDevices);
if( wDev < (int)numDevices ) {
hCtx = WTMgrDefContextEx(hMgr, wDev, fSys);
if( !hCtx )
hCtx = WTMgrDefContext(hMgr, fSys);
} else
hCtx = WTMgrDefContext(hMgr, fSys); /* 'Default Device' was the last choice in the dialog */
btn.lc = &lc;
/* Read the button masks */
if( !hCtx ) {
MessageBox( hWnd, "Failed to open default context.", "MgrTest", MB_ICONHAND | MB_OK );
return;
}
if( !WTGet( hCtx, btn.lc ) ) {
MessageBox( hWnd, "WTGet failed.", "MgrTest", MB_ICONHAND | MB_OK );
return;
}
if( WTExtGet( hCtx, WTX_XBTNMASK, &btn.xBtnMask ) )
btn.xBtnMask_avail = TRUE;
else {
btn.xBtnMask_avail = FALSE;
memset( btn.xBtnMask.xBtnDnMask, 0, sizeof(XBTNMASK) );
}
/* Do the button bit dialog */
fpProc = MakeProcInstance((FARPROC)BtnMaskDlgProc, hWnd);
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_BTNMASKS), hWnd, fpProc, (long)&btn);
FreeProcInstance(fpProc);
/* Set the new button masks */
if( id == IDOK ) {
if( !WTSet( hCtx, btn.lc ) )
MessageBox( hWnd, "WTSet failed.", "MgrTest", MB_ICONHAND | MB_OK );
if( btn.xBtnMask_avail && !WTExtSet( hCtx, WTX_XBTNMASK, &btn.xBtnMask ) )
MessageBox( hWnd, "WTExtSet failed.", "MgrTest", MB_ICONHAND | MB_OK );
}
}
}
void
set_ctx_BtnMask( HWND hWnd, HCTX hCtx, LOGCONTEXT * lc )
{
FARPROC fpProc;
btn_info btn;
int id;
btn.lc = lc;
if( WTExtGet( hCtx, WTX_XBTNMASK, &btn.xBtnMask ) )
btn.xBtnMask_avail = TRUE;
else {
btn.xBtnMask_avail = FALSE;
memset( btn.xBtnMask.xBtnDnMask, 0, sizeof(XBTNMASK) );
}
fpProc = MakeProcInstance((FARPROC)BtnMaskDlgProc, hWnd);
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_BTNMASKS), hWnd, fpProc, (long)&btn);
FreeProcInstance(fpProc);
if( id == IDOK ) {
/* Set the new button masks */
if( !WTSet( hCtx, btn.lc ) )
MessageBox( hWnd, "WTSet failed.", "MgrTest", MB_ICONHAND | MB_OK );
if( btn.xBtnMask_avail && !WTExtSet( hCtx, WTX_XBTNMASK, &btn.xBtnMask ) )
MessageBox( hWnd, "WTExtSet failed.", "MgrTest", MB_ICONHAND | MB_OK );
}
}

View File

@@ -0,0 +1,183 @@
#include <windows.h>
#include "wintab.h"
#include "Mgrtest.h"
#include "resource.h"
static const unsigned textfield[4] = { IDC_TEXT1, IDC_TEXT2, IDC_TEXT3, IDC_TEXT4 };
extern HANDLE hInst;
static void CsrDisplayBits( HWND hDlg, const BYTE FAR csrmask[16] )
{
char buf[33];
unsigned i, j;
buf[32] = 0;
for( i = 0; i < 4; i++ ) {
for( j = 0; j < 32; j++ )
buf[j] = '0' + ((csrmask[4*i + j/8] >> (j%8)) & 0x01);
SetWindowText(GetDlgItem(hDlg, textfield[i]), buf);
}
}
BOOL
CALLBACK CsrmaskDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam)
{
static BYTE FAR * csrmask;
BOOL fResult;
int i;
LRESULT val;
switch (Msg) {
case WM_INITDIALOG:
/* Display the Csrmask bitfield bits */
csrmask = (BYTE FAR *)lParam;
CsrDisplayBits(hDlg, csrmask);
fResult = TRUE;
/* List the available cursors, and highlight them if their Csrmask bits are set */
i = 0;
while( WTInfo( WTI_CURSORS + i, 0, 0 ) ) {
char name[1024];
WTInfo( WTI_CURSORS + i, CSR_NAME, name );
SendDlgItemMessage( hDlg, IDC_CSRLST, LB_ADDSTRING, 0, (LPARAM)((char FAR *)name) );
i++;
}
/* for Unknown Reason, sending LB_SETSEL right after LB_ADDSTRING doesn't work reliably */
i = 0;
while( WTInfo( WTI_CURSORS + i, 0, 0 ) ) {
/* Highlight the name in the selection box */
SendDlgItemMessage( hDlg, IDC_CSRLST, LB_SETSEL, (csrmask[i/8] >> (i%8)) & 0x01, i );
i++;
}
break;
case WM_LBUTTONDOWN:
/* If clicked on a number in IDC_TEXT?, then change it's corrisponding bit */
i = test_bitboxes( hDlg, lParam, 32, 4, textfield );
if( i > -1 ) {
/* Flip the bit */
csrmask[i / 8] ^= 1 << (i % 8);
CsrDisplayBits(hDlg, csrmask);
/* Highlight the corrisponding cursor in the listbox appropriately */
SendDlgItemMessage( hDlg, IDC_CSRLST, LB_SETSEL, (csrmask[i/8] >> (i%8)) & 0x01, i );
}
fResult = TRUE;
break;
case WM_COMMAND:
switch( wParam ) {
case IDOK:
EndDialog(hDlg, wParam);
fResult = TRUE;
break;
case IDCANCEL:
EndDialog(hDlg, wParam);
fResult = TRUE;
break;
default:
if( HIWORD(wParam) == LBN_SELCHANGE || wParam == IDC_CSRLST ) {
/* Set all of the bits according to the selection box selections until error */
i = 0;
fResult = FALSE;
while( !fResult ) {
val = SendMessage( (HWND)lParam, LB_GETSEL, i, 0 );
if( val > 0 )
csrmask[i/8] |= 1 << (i%8);
else
if( val == 0 )
csrmask[i/8] &= ~(1 << (i%8));
else
fResult = TRUE;
i++;
}
/* Redisplay the bits */
CsrDisplayBits(hDlg, csrmask);
}
break;
}
break;
default:
fResult = FALSE;
break;
}
return fResult;
}
void
set_default_CsrMask( HWND hWnd, HMGR hMgr, int fSys )
{
int wDev;
FARPROC lpProcDlg;
/* Get a device # */
lpProcDlg = MakeProcInstance( (FARPROC)CursInfoDlgProc, hInst);
wDev = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hWnd, lpProcDlg, WTI_DDCTXS);
FreeProcInstance(lpProcDlg);
if( wDev >= 0 ) {
FARPROC fpProc;
HCTX hCtx;
int id;
BYTE CsrMask[16];
unsigned numDevices;
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &numDevices);
if( wDev < (int)numDevices ) {
hCtx = WTMgrDefContextEx(hMgr, wDev, fSys);
if( !hCtx )
hCtx = WTMgrDefContext(hMgr, fSys);
} else
hCtx = WTMgrDefContext(hMgr, fSys); /* 'Default Device' was the last choice in the dialog */
/* Read the button masks */
if( !hCtx ) {
MessageBox( hWnd, "Failed to open default context.", "MgrTest", MB_ICONHAND | MB_OK );
return;
}
if( !WTExtGet( hCtx, WTX_CSRMASK, CsrMask ) ) {
MessageBox( hWnd, "Cursor mask not supported on this device.", "MgrTest", MB_ICONHAND | MB_OK );
return;
}
/* Do the button bit dialog */
fpProc = MakeProcInstance((FARPROC)CsrmaskDlgProc, hInst );
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_CSRMASKS), hWnd, fpProc, (long)((BYTE FAR *)CsrMask));
FreeProcInstance(fpProc);
/* Set the new button masks */
if( id == IDOK ) {
if( !WTExtSet( hCtx, WTX_CSRMASK, CsrMask ) )
MessageBox( hWnd, "WTExtSet failed.", "MgrTest", MB_ICONHAND | MB_OK );
}
}
}

View File

@@ -0,0 +1,203 @@
/* ------------------------------- infodlg.c -------------------------------- */
/* 11-25-91 DMH -- Dialog boxes to mediate cursor/extension info-boxes, */
/* 6/1/98 Napoli -- Added WTI_DDCTXS, WTI_DSCTXS */
/* -- Copied from wttest32 to mgrtest */
#include <string.h>
#include <windows.h>
#include <tchar.h>
#include "wintab.h"
#include "mgrtest.h"
#define Abort() EndDialog(hDlg, -2)
extern HANDLE hInst;
#ifndef WIN32
#define TCHAR char
#define wcscpy(a,b) strcpy((a),(b))
#define TEXT(a) (a)
#endif
BOOL CALLBACK CursInfoDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam)
{
int cBaseCat;
/* Base category -- cursors, devices, extensions? */
int cNumCats=0;
int nNameCat=1; /* For all three the *_NAME Index is 1. &&&MAGIC&&&*/
int cSize;
long nCat;
TCHAR *szCatName;
TCHAR PhraseBuf[40];
TCHAR TextBuf[40];
TCHAR szNameBuf[128];
lParam = lParam; /* Nuke warning */
switch (Msg) {
default:
return FALSE;
case WM_INITDIALOG:
cBaseCat = LOWORD(lParam);
switch (cBaseCat) {
default:
EndDialog(hDlg, -2);
break;
case WTI_DDCTXS:
case WTI_DSCTXS:
case WTI_DEVICES:
szCatName = TEXT("Device");
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &cNumCats);
if( cBaseCat == WTI_DDCTXS || cBaseCat == WTI_DSCTXS ) {
WORD ver;
if( !WTInfo(WTI_INTERFACE,IFC_SPECVERSION, &ver) ||
((ver >> 8) <= 1 && (ver & 0xff) <= 10) ) {
/* Apparently, this version of Wintab doesn't support WTI_DDCTXS
or WTI_DSCTXS; return cNumCats, to indicate "default device"
since no other categories actually exist. */
EndDialog(hDlg, cNumCats);
return TRUE;
}
}
break;
case WTI_CURSORS:
szCatName = TEXT("Cursor");
WTInfo(WTI_INTERFACE, IFC_NCURSORS, &cNumCats);
break;
case WTI_EXTENSIONS:
szCatName = TEXT("Extension");
WTInfo(WTI_INTERFACE, IFC_NEXTENSIONS, &cNumCats);
break;
/* Failure to support IFC_N* is handled later. */
} /* Switch on lParam */
if (cNumCats == 1)
EndDialog(hDlg, 0);
/*&&& Send message to secret field, indicating this window's
cBaseCat. Also, set window's title field and caption. */
GetWindowText(hDlg, TextBuf, sizeof(TextBuf));
wsprintf(PhraseBuf, TextBuf, (LPSTR)szCatName);
SetWindowText(hDlg, PhraseBuf);
GetDlgItemText(hDlg, LBC_TITLE, TextBuf, sizeof(TextBuf));
wsprintf(PhraseBuf, TextBuf, (LPSTR)szCatName);
SetDlgItemText(hDlg, LBC_TITLE, PhraseBuf);
SetDlgItemInt(hDlg, LBC_BASECAT, cBaseCat, FALSE);
/* How many items are there? Catch un-reported items.*/
while (WTInfo(cBaseCat + cNumCats, 0, NULL))
cNumCats++;
while (cNumCats > 0 && !WTInfo(cBaseCat + cNumCats-1, 0, NULL))
cNumCats--;
if (cNumCats == 0) {
wsprintf(PhraseBuf, TEXT("No %ss defined!"), (LPSTR)szCatName);
MessageBox(hInst, PhraseBuf, TEXT("Info Boxes"),
MB_ICONINFORMATION | MB_OK);
EndDialog(hDlg, -2);
return TRUE;
}
/* Fill list Box */
for (nCat = 0; nCat < cNumCats; nCat++) {
cSize = WTInfo(cBaseCat + (int)nCat, CSR_NAME,
(LPVOID) szNameBuf);
if (cSize == 0 || szNameBuf[0] == '\0')
wsprintf(szNameBuf, TEXT("%s #%d"), (LPSTR)szCatName,(int)nCat);
cSize = (int)SendDlgItemMessage(hDlg, LBC_LISTBOX,
LB_INSERTSTRING, (WPARAM)-1, (DWORD)(LPSTR)szNameBuf);
if (cSize == LB_ERR || cSize == LB_ERRSPACE) {
MessageBox(hInst, TEXT("Couldn't set an item name!"), TEXT("Info Boxes"),
MB_ICONINFORMATION | MB_OK);
/* EndDialog(hDlg, -2);
return TRUE; /* Abort on failure */
} /* Abort on failure */
else
;
} /* for each cursor */
if( cBaseCat == WTI_DDCTXS || cBaseCat == WTI_DSCTXS ) {
/* Give a 'Default Device' choice, to fall back to WTI_DEFCONTEXT, WTI_DEFSYSCTX */
wcscpy((wchar_t *)szNameBuf, (wchar_t *)TEXT("Default Device"));
SendDlgItemMessage(hDlg, LBC_LISTBOX, LB_INSERTSTRING, (WPARAM)-1, (DWORD)(LPSTR)szNameBuf);
}
/* Default selection was current cursor. Now, skipping the whole
thing, because there can be multiple active cursors! */
nCat = 0; /* Index of 0, First item. */
if (LB_ERR == (int)SendDlgItemMessage(hDlg, LBC_LISTBOX,
LB_SETCURSEL, (int)nCat, (long)NULL))
MessageBox(hInst, TEXT("Couldn't set current selection!"),
TEXT("Info Boxes"),
MB_ICONINFORMATION | MB_OK);
return TRUE;
case WM_COMMAND:
switch (wParam) {
default:
return FALSE;
case LBC_LISTBOX:
if (HIWORD(lParam)!=LBN_DBLCLK)
return FALSE;
// fall through on double click!
case IDOK:
cBaseCat = GetDlgItemInt(hDlg, LBC_BASECAT, NULL,
FALSE);
nCat = (int)SendDlgItemMessage(hDlg, LBC_LISTBOX,
LB_GETCURSEL, 0,
(long)NULL);
EndDialog(hDlg, (int)nCat);
return TRUE;
case IDCANCEL:
EndDialog(hDlg, -1);
return TRUE;
} /* Switch wParam on WM_COMMAND */
} /* switch Msg number */
return FALSE;
} /* CursInfoDlgProc */

View File

@@ -0,0 +1,295 @@
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include "msgpack.h"
#include <wintab.h>
#include "mgrdlg.h"
extern HMGR hMgr;
/* Fake a notification msg to our own dialog. */
#define FakeNotify(Ctl, Msg) FORWARD_WM_COMMAND(hDlg, Ctl, \
GetDlgItem(hDlg, Ctl), Msg, SendMessage)
char Logical[]="Button #\0\0\0\0\0";
char *LogNum= Logical+8;
WORD wCsr=0xFFFF; /* Current Cursor */
unsigned char bLogBtns[32]={0}, bSysBtns[32]={0};
char *MseActs[]={
"No Mouse Action",
"Left Click",
"Left Double-Click",
"Left Drag",
"Right Click",
"Right Double-Click",
"Right Drag",
"Middle Click",
"Middle Double-Click",
"Middle Drag",
NULL
};
char *PenActs[]={
"No Pen Action",
"Tip Click",
"Tip Double-Click",
"Tip Drag",
"Inverted Click",
"Inverted Double-Click",
"Inverted Drag",
"Barrel 1 Click",
"Barrel 1 Double-Click",
"Barrel 1 Drag",
"Barrel 2 Click",
"Barrel 2 Double-Click",
"Barrel 2 Drag",
"Barrel 3 Click",
"Barrel 3 Double-Click",
"Barrel 3 Drag",
NULL
};
/* Primitive -- load into globals */
void static GetButtonMaps(HWND hDlg)
{
char NameBuf[500], *Name;
WTInfo(WTI_CURSORS+wCsr, CSR_BTNNAMES, NameBuf);
WTInfo(WTI_CURSORS+wCsr, CSR_BUTTONMAP, bLogBtns);
WTInfo(WTI_CURSORS+wCsr, CSR_SYSBTNMAP, bSysBtns);
/* Clear out old strings */
while (SendDlgItemMessage(hDlg, IDC_NAMES,
CB_DELETESTRING, 0, 0L))
;
for (Name = NameBuf; *Name != '\0';
Name += lstrlen(Name)+1)
SendDlgItemMessage(hDlg, IDC_NAMES, CB_ADDSTRING,
0, (LPARAM)(LPSTR)Name);
}
/* Primitive -- Set values from globals */
void static SetButtonMaps(HWND hDlg)
{
if (wCsr == 0xFFFF)
return;
WTMgrCsrButtonMap(hMgr, wCsr, bLogBtns, bSysBtns);
}
/* Primitive -- Set default values */
void static ResetButtonMaps(HWND hDlg)
{
if (wCsr == 0xFFFF)
return;
WTMgrCsrButtonMap(hMgr, wCsr, WTP_LPDEFAULT, WTP_LPDEFAULT);
}
BOOL CALLBACK ButtonDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
int wTmp, i, wTmpCsr;
static char Name[80];
WORD id, cmd;
HWND hWnd;
switch (msg) {
default:
return FALSE;
case WM_INITDIALOG:
/* Cursor names */
WTInfo(WTI_INTERFACE, IFC_NCURSORS, &wTmp);
for (i = 0; i < wTmp; i++) {
BOOL fActive;
/* remember first active cursor. */
WTInfo(WTI_CURSORS+i, CSR_ACTIVE, &fActive);
if (fActive) {
wTmpCsr = i;
}
WTInfo(WTI_CURSORS+i, CSR_NAME, Name);
SendDlgItemMessage(hDlg, IDC_CURSORS, CB_ADDSTRING, 0,
(LPARAM)(LPSTR)Name);
}
/* Logical button numbers */
for (i = 0; i < 32; i++) {
sprintf( LogNum, "%i", i );
/* itoa(i, LogNum, 10); */
SendDlgItemMessage(hDlg, IDC_LOGICAL, CB_ADDSTRING, 0,
(LPARAM)(LPSTR)Logical);
}
/* Mouse Actions */
for (i = 0; MseActs[i] != NULL; i++) {
SendDlgItemMessage(hDlg, IDC_MOUSE, CB_ADDSTRING, 0,
(LPARAM)(LPSTR)(MseActs[i]));
}
/* Pen Actions */
for (i = 0; PenActs[i] != NULL; i++) {
SendDlgItemMessage(hDlg, IDC_PEN, CB_ADDSTRING, 0,
(LPARAM)(LPSTR)(PenActs[i]));
}
SendDlgItemMessage(hDlg, IDC_NAMES, CB_ADDSTRING,
0, (LPARAM)(LPSTR)"FOOBAR");
/* start with current cursor selected. */
SendDlgItemMessage(hDlg, IDC_CURSORS,
CB_SETCURSEL, wTmpCsr, 0L);
FakeNotify(IDC_CURSORS, CBN_SELCHANGE);
return TRUE;
case WM_COMMAND:
id = GET_WM_COMMAND_ID(wParam, lParam);
cmd = GET_WM_COMMAND_CMD(wParam, lParam);
hWnd = GET_WM_COMMAND_HWND(wParam, lParam);
switch (id) {
case IDC_CURSORS:
if (cmd == CBN_SELCHANGE) {
/* Set old values */
SetButtonMaps(hDlg);
/* Set Button names and cascade selections. */
wCsr = (WORD)SendDlgItemMessage(hDlg, IDC_CURSORS,
CB_GETCURSEL, 0, 0L);
GetButtonMaps(hDlg);
/* Fake selection to continue cascade */
SendDlgItemMessage(hDlg, IDC_NAMES,
CB_SETCURSEL, 0, 0L);
FakeNotify(IDC_NAMES, CBN_SELCHANGE);
} /* selchange */
break;
case IDC_NAMES:
if (cmd == CBN_SELCHANGE) {
wTmp = (WORD)SendDlgItemMessage(hDlg, IDC_NAMES,
CB_GETCURSEL, 0, 0L);
/* Fake selection to continue cascade */
SendDlgItemMessage(hDlg, IDC_LOGICAL,
CB_SETCURSEL, bLogBtns[wTmp], 0L);
FakeNotify(IDC_LOGICAL, CBN_SELCHANGE);
}
break;
case IDC_LOGICAL:
if (cmd == CBN_SELCHANGE) {
WORD wButton=0;
wButton = (WORD)SendDlgItemMessage(hDlg, IDC_NAMES,
CB_GETCURSEL, 0, 0L);
wTmp = (WORD)SendDlgItemMessage(hDlg, IDC_LOGICAL,
CB_GETCURSEL, 0, 0L);
bLogBtns[wButton] = (BYTE)wTmp;
/* Fake selection to continue cascade */
SendDlgItemMessage(hDlg, IDC_MOUSE,
CB_SETCURSEL, bSysBtns[wTmp] & 0xF, 0L);
SendDlgItemMessage(hDlg, IDC_PEN,
CB_SETCURSEL, bSysBtns[wTmp] >> 4, 0L);
}
break;
case IDC_MOUSE:
if (cmd == CBN_SELCHANGE) {
WORD wButton=0;
wButton = (WORD)SendDlgItemMessage(hDlg, IDC_LOGICAL,
CB_GETCURSEL, 0, 0L);
wTmp = (WORD)SendDlgItemMessage(hDlg, IDC_MOUSE,
CB_GETCURSEL, 0, 0L);
bSysBtns[wButton] &= 0xF0;
bSysBtns[wButton] |= wTmp & 0x0F;
}
break;
case IDC_PEN:
if (cmd == CBN_SELCHANGE) {
WORD wButton=0;
wButton = (WORD)SendDlgItemMessage(hDlg, IDC_LOGICAL,
CB_GETCURSEL, 0, 0L);
wTmp = (WORD)SendDlgItemMessage(hDlg, IDC_PEN,
CB_GETCURSEL, 0, 0L);
bSysBtns[wButton] &= 0x0F;
bSysBtns[wButton] |= (wTmp & 0x0F) << 4;
}
break;
case IDC_DEFAULT:
/* Set maps back to defaults */
ResetButtonMaps(hDlg);
wCsr = 0xFFFF;
FakeNotify(IDC_CURSORS, CBN_SELCHANGE);
break;
case IDOK:
SetButtonMaps(hDlg);
EndDialog(hDlg, id);
break;
case IDCANCEL:
EndDialog(hDlg, id);
break;
} /* Switch id */
} /* Switch msg */
return TRUE;
}


View File

@@ -0,0 +1,33 @@
DLGINCLUDE RCDATA DISCARDABLE
BEGIN
"MGRDLG.H\0"
END
IDD_BUTTONS DIALOG 105, -8, 145, 205
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Cursor/Button Settings"
FONT 8, "Helv"
BEGIN
LTEXT "&Cursor", -1, 12, 9, 22, 8
COMBOBOX IDC_CURSORS, 12, 18, 120, 53, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Physical &Buttons", -1, 12, 33, 55, 8
COMBOBOX IDC_NAMES, 12, 42, 120, 53, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "&Logical Buttons", -1, 12, 77, 55, 8
COMBOBOX IDC_LOGICAL, 12, 86, 120, 53, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "&Mouse Action", -1, 12, 123, 55, 8
COMBOBOX IDC_MOUSE, 12, 132, 120, 53, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "&Pen Action", -1, 12, 147, 37, 8
COMBOBOX IDC_PEN, 12, 156, 120, 53, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
PUSHBUTTON "OK", IDOK, 6, 185, 40, 14
PUSHBUTTON "Cancel", IDCANCEL, 52, 185, 40, 14, WS_GROUP
PUSHBUTTON "&Default", IDC_DEFAULT, 98, 185, 40, 14, WS_GROUP
CONTROL "", 107, "Static", SS_BLACKFRAME, 6, 6, 132, 55
CONTROL "", 108, "Static", SS_BLACKFRAME, 6, 74, 132, 32
CONTROL "", 109, "Static", SS_BLACKFRAME, 6, 120, 132, 56
END


View File

@@ -0,0 +1,31 @@
#define IDD_BUTTONS 100
#define IDC_CURSORS 101
#define IDC_NAMES 102
#define IDC_LOGICAL 103
#define IDC_MOUSE 104
#define IDC_PEN 105
#define IDC_DEFAULT 106
#define IDD_BTNMASKS 600
#define BMD_BASE 601
#define BMD_MAX 632
#define BMD_DISPLAY 665
#define BMU_BASE 633
#define BMU_MAX 664
#define BMU_DISPLAY 668
#define XBD_DISPLAY1 669
#define XBD_DISPLAY2 670
#define XBD_DISPLAY3 671
#define XBD_DISPLAY4 672
#define XBD_DISPLAY5 673
#define XBD_DISPLAY6 674
#define XBD_DISPLAY7 675
#define XBD_DISPLAY8 676
#define XBU_DISPLAY1 677
#define XBU_DISPLAY2 678
#define XBU_DISPLAY3 679
#define XBU_DISPLAY4 680
#define XBU_DISPLAY5 681
#define XBU_DISPLAY6 682
#define XBU_DISPLAY7 683
#define XBU_DISPLAY8 684

View File

@@ -0,0 +1,36 @@
/* -------------------------------- mgrdll.c -------------------------------- */
#include <windows.h>
#include <wintab.h>
/* -------------------------------------------------------------------------- */
/* Win32 dll entry/exit point. */
/* -------------------------------------------------------------------------- */
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
return TRUE;
}
/* -------------------------------------------------------------------------- */
/* Win16 dll entry point. */
/* -------------------------------------------------------------------------- */
BOOL WINAPI LibMain(HANDLE hModule, WORD wDataSeg, WORD cbHeapSize,
LPSTR lpCmdLine)
{
return TRUE;
}
/* -------------------------------------------------------------------------- */
/* Win16 dll exit point. */
/* -------------------------------------------------------------------------- */
int WINAPI WEP(int nSystemExit)
{
return TRUE;
}
/* -------------------------------------------------------------------------- */
BOOL CALLBACK CBRTestProc(HCTX hCtx, HWND hWnd)
{
MessageBox(hWnd, "WTMgrConfigReplace() test succeeded!", "MgrTest",
MB_ICONINFORMATION | MB_OK);
return(FALSE);
}
/* -------------------------------------------------------------------------- */


View File

@@ -0,0 +1,949 @@
/* ------------------------------- mgrtest.c -------------------------------- */
#include <windows.h>
//#include <winuser.h>
#include <string.h>
#include <wintab.h>
#include "mgrdlg.h"
#include "resource.h"
#include "msgpack.h"
#include "mgrtest.h"
HANDLE hInst;
/* application globals */
HMGR hMgr = NULL;
UINT ObtCat;
UINT ObtSize;
BOOL *ObtBuf;
HMENU hObtMenu = NULL;
UINT NDevices;
HMODULE hWintab = NULL;
/* If the exe imports WTMgrDefContextEx(), then we won't be able to run with
older Wintab.dll/Wintab32.dll's which are don't support Wintab Spec 1.1.
Instead, we'll try to GetProcAddress it ourselves. On failure, just disable
features that depend on it. */
HCTX (API * pWTMgrDefContextEx)(HMGR, UINT, BOOL);
extern BOOL FAR PASCAL ButtonDlgProc(HWND, UINT, WPARAM, LPARAM);
void set_default_BtnMask( HWND hWnd, HMGR hMgr, int fSys ); /* BtnMask.c */
void set_default_CsrMask( HWND hWnd, HMGR hMgr, int fSys ); /* Csrmask.c */
void set_xBtnMap( HWND hWnd, HMGR hMgr ); /* btnMap.c */
/*------------------------------------------------------------------------------
encapsulate non-portable items:
wintab string name
LoadLibrary behavior
Unicode/ANSI function name suffixes
------------------------------------------------------------------------------*/
#ifdef WIN32
/* no Unicode support yet. */
#define CHARSET "A"
char szWintab[] = "Wintab32";
#define LoadLibraryWorked(h) (h)
#else
#define CHARSET
char szWintab[] = "Wintab";
#define LoadLibraryWorked(h) (h >= HINSTANCE_ERROR)
#endif
/* -------------------------------------------------------------------------- */
/* portable wrappers for non-portable functions. */
/* -------------------------------------------------------------------------- */
BOOL ConfigReplace(HMGR h, BOOL f, LPSTR m, LPSTR p)
{
typedef BOOL (API *CRX)(HMGR, int, LPSTR, LPSTR);
typedef BOOL (API *CR)(HMGR, int, WTCONFIGPROC);
static CR cr = NULL;
static CRX crx = NULL;
/* if not got wintab handle... */
if (!hWintab)
/* get wintab handle. */
hWintab = LoadLibrary(szWintab);
/* failsafe. */
if (!LoadLibraryWorked(hWintab))
return FALSE;
/* if not got a proc... */
if (!crx && !cr) {
/* try for portable version. */
crx = (CRX)GetProcAddress(hWintab, "WTMgrConfigReplaceEx" CHARSET);
/* if no portable version... */
if (!crx)
/* try for non-portable version. */
cr = (CR)GetProcAddress(hWintab, "WTMgrConfigReplace");
}
/* failsafe. */
if (!crx && !cr)
return FALSE;
/* if portable version... */
if (crx) {
/* call it. */
return crx(h, f, m, p);
}
else {
/* convert arguments to call non-portable version. */
static HMODULE curh = NULL;
/* if args and state legal for installing... */
if (f && m && p && !curh) {
/* try to get the library. */
curh = LoadLibrary(m);
/* if got library... */
if (LoadLibraryWorked(curh)) {
WTCONFIGPROC fp;
/* try to get the proc. */
fp = (WTCONFIGPROC)GetProcAddress(curh, p);
/* if got the proc... */
if (fp) {
/* call the non-portable function to install. */
f = cr(h, f, fp);
/* if install failed... */
if (!f) {
/* free library and reset our state. */
FreeLibrary(curh);
curh = NULL;
}
return f;
}
else {
/* no proc in the library -- free it and fail. */
FreeLibrary(curh);
return FALSE;
}
}
else {
/* couldn't load library -- fail. */
return FALSE;
}
}
else if (!f && curh) {
/* args and state legal for removing -- try remove. */
f = cr(h, f, NULL);
/* if removal succeeded... */
if (f) {
/* free library and reset our state. */
FreeLibrary(curh);
curh = NULL;
}
return f;
}
else {
/* args or state illegal. */
return FALSE;
}
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
UINT ScanExts(UINT wTag)
{
UINT i;
UINT wScanTag;
/* scan for wTag's info category. */
for (i = 0; WTInfo(WTI_EXTENSIONS + i, EXT_TAG, &wScanTag); i++) {
if (wTag == wScanTag) {
/* return category offset from WTI_EXTENSIONS. */
return i;
}
}
/* return error code. */
return 0xFFFF;
}
/* -------------------------------------------------------------------------- */
BOOL ObtInit(void)
{
ObtCat = ScanExts(WTX_OBT);
if (ObtCat == 0xFFFF)
return FALSE;
ObtSize = WTInfo(WTI_EXTENSIONS + ObtCat, EXT_DEFAULT, NULL);
if (ObtBuf = (BOOL *)LocalAlloc(LPTR, ObtSize)) {
return TRUE;
}
return FALSE;
}
/* -------------------------------------------------------------------------- */
BOOL ObtGet(UINT wDev)
{
WTInfo(WTI_EXTENSIONS + ObtCat, EXT_DEFAULT, ObtBuf);
return ObtBuf[wDev];
}
/* -------------------------------------------------------------------------- */
BOOL ObtSet(UINT wDev, BOOL fOn)
{
ObtBuf[wDev] = fOn;
return WTMgrExt(hMgr, WTX_OBT, ObtBuf);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int PASCAL WinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow)
HANDLE hInstance;
HANDLE hPrevInstance;
LPSTR lpCmdLine;
int nCmdShow;
{
MSG msg;
if (!hPrevInstance)
if (!InitApplication(hInstance))
return (FALSE);
/* Perform initializations that apply to a specific instance */
if (!InitInstance(hInstance, nCmdShow))
return (FALSE);
/* Acquire and dispatch messages until a WM_QUIT message is received. */
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return (msg.wParam);
}
/* -------------------------------------------------------------------------- */
BOOL InitApplication(hInstance)
HANDLE hInstance;
{
WNDCLASS wc;
/* Fill in window class structure with parameters that describe the */
/* main window. */
wc.style = 0;
wc.lpfnWndProc = MainWndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(1 + COLOR_APPWORKSPACE);
wc.lpszMenuName = "MgrTestMenu";
wc.lpszClassName = "MgrTestWClass";
/* Register the window class and return success/failure code. */
return (RegisterClass(&wc));
}
/* -------------------------------------------------------------------------- */
BOOL InitInstance(hInstance, nCmdShow)
HANDLE hInstance;
int nCmdShow;
{
HWND hWnd;
HMENU hMenu, hCsrMenu;
char *p;
UINT size;
int i;
/* Save the instance handle in static variable, which will be used in */
/* many subsequence calls from this application to Windows. */
hInst = hInstance;
/* check if WinTab available. */
if (!WTInfo(0, 0, NULL)) {
MessageBox(NULL, "WinTab Services Not Available.", "WinTab",
MB_OK | MB_ICONHAND);
return FALSE;
}
/* Create a main window for this application instance. */
hWnd = CreateWindow(
"MgrTestWClass",
"MgrTest Sample Application",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hInstance,
NULL
);
/* If window could not be created, return "failure" */
if (!hWnd) {
if (!hMgr)
MessageBox(NULL, "Can't get Manager Handle.", "MgrTest",
MB_ICONHAND | MB_OK);
return (FALSE);
}
/* get device count. */
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &NDevices);
/* Tack on more menu items. */
hMenu = GetSubMenu(GetMenu(hWnd), IDM_EDIT);
hCsrMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_POPUP, (UINT)hCsrMenu, "&Active Cursors");
for (i = 0; size = WTInfo(WTI_CURSORS + i, CSR_NAME, NULL); i++) {
if (p = (char *)LocalAlloc(LPTR, 1 + size)) {
BOOL fActive;
p[0] = '&';
WTInfo(WTI_CURSORS + i, CSR_NAME, p + 1);
AppendMenu(hCsrMenu, 0, IDM_CURSORS + i, p);
LocalFree((HLOCAL)p);
WTInfo(WTI_CURSORS + i, CSR_ACTIVE, &fActive);
CheckMenuItem(hCsrMenu, IDM_CURSORS + i,
(fActive ? MF_CHECKED : MF_UNCHECKED));
}
}
hObtMenu = NULL;
if (ObtInit()) {
if (NDevices > 1) {
hObtMenu = CreatePopupMenu();
ModifyMenu(hMenu, IDM_OBT, MF_POPUP, (UINT)hObtMenu,
"&Out of Bounds Tracking");
}
else {
CheckMenuItem(hMenu, IDM_OBT,
(ObtGet(0) ? MF_CHECKED : MF_UNCHECKED));
}
}
else {
EnableMenuItem(hMenu, IDM_OBT, MF_GRAYED);
}
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
for (i = 0; size = WTInfo(WTI_DEVICES + i, DVC_NAME, NULL); i++) {
static char suffix[] = " Settings...";
if (p = (char *)LocalAlloc(LPTR, 1 + size + sizeof(suffix))) {
p[0] = '&';
WTInfo(WTI_DEVICES + i, DVC_NAME, p + 1);
strtok(p, ";");
if (hObtMenu)
AppendMenu(hObtMenu, (ObtGet(i) ? MF_CHECKED : MF_UNCHECKED),
IDM_OBTDEVS + i, p);
strcat(p, suffix);
AppendMenu(hMenu, 0, IDM_DEVICES + i, p);
LocalFree((HLOCAL)p);
}
}
/* Make the window visible; update its client area; and return "success" */
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return (TRUE);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* statics for context list painting. */
static int nLine = 0;
static char buf[200];
static SIZE szTextExtent = {0};
static LOGCONTEXT lc;
static char ownertext[40];
static HCTX hCtxOrder[50];
static int nCtxs = 0;
/* -------------------------------------------------------------------------- */
BOOL FAR PASCAL Do1Context(HCTX hCtx, LPARAM lParam)
{
HDC hDC = (HDC)lParam;
char *p = buf;
HWND hOwner;
char status[30] = "";
unsigned len;
hCtxOrder[nLine] = hCtx;
WTGet(hCtx, &lc);
/* Decode status */
if( lc.lcStatus & CXS_DISABLED )
strcpy( status, "Disabled," );
if( lc.lcStatus & CXS_OBSCURED )
strcat( status, "Obscured," );
if( lc.lcStatus & CXS_ONTOP )
strcat( status, "On Top," );
len = strlen( status );
if( len ) /* Get rid of the last comma */
status[len-1] = 0;
hOwner = WTMgrContextOwner(hMgr, hCtx);
GetWindowText(hOwner, ownertext, 40);
TextOut(hDC, 0, nLine * szTextExtent.cy, status, len - 1); /* Display status information */
_itoa( lc.lcDevice, status, 10 );
TextOut(hDC, 17*szTextExtent.cx, nLine*szTextExtent.cy, status, strlen(status) );
wsprintf(p, "%s:%s", (LPSTR)lc.lcName, (LPSTR)ownertext);
TextOut(hDC, 19 * szTextExtent.cx, nLine++ * szTextExtent.cy, buf, strlen(buf)); /* Display context name */
return TRUE;
}
/* -------------------------------------------------------------------------- */
BOOL ListContexts(HDC hDC, PAINTSTRUCT *ps)
{
static char info[] = "To edit a context, click on it in the above list.";
BOOL fResult;
FARPROC fp;
if (!szTextExtent.cx)
GetTextExtentPoint(hDC, "M", 1, &szTextExtent);
nLine = 0;
SetTextColor(hDC, GetSysColor(COLOR_WINDOWTEXT));
SetBkColor(hDC, GetSysColor(COLOR_APPWORKSPACE));
fp = MakeProcInstance((FARPROC)Do1Context, hInst);
fResult = WTMgrContextEnum(hMgr, (WTENUMPROC)fp, (LPARAM)hDC);
FreeProcInstance(fp);
nCtxs = nLine;
TextOut(hDC, 0, (1 + nLine) * szTextExtent.cy, info, strlen(info));
return fResult;
}
/* -------------------------------------------------------------------------- */
HCTX ListPoint(int y)
{
int n = y / szTextExtent.cy;
return ( n < nCtxs ? hCtxOrder[n] : NULL);
}
/* -------------------------------------------------------------------------- */
BOOL QueryKillCtx(HWND hWnd, HCTX hCtx)
{
static char msg[] =
"Closing this context may cause the owning application %s to crash."
"Do you want to close it anyway?";
HWND hOwner;
hOwner = WTMgrContextOwner(hMgr, hCtx);
if (IsWindow(hOwner)) {
GetWindowText(hOwner, ownertext, 40);
wsprintf(buf, msg, (LPSTR)ownertext);
return (MessageBox(hWnd, buf, "MgrTest", MB_ICONSTOP|MB_OKCANCEL)==IDOK);
}
else
return TRUE;
}
void set_default_device( HWND hWnd, int fSys )
{
int id;
HCTX hCtx;
FARPROC lpProcDlg;
lpProcDlg = MakeProcInstance(CursInfoDlgProc, hInst);
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hInst, lpProcDlg, WTI_DEVICES);
FreeProcInstance(lpProcDlg);
if( id >= 0 ) {
LOGCONTEXT log;
/* Change the default device
(the device that is used by WTI_DEFCONTEXT, WTI_DEFSYSCTX and WTMgrDefContext) */
hCtx = WTMgrDefContextEx(hMgr, id, fSys);
if( !hCtx ) {
MessageBox(hWnd, "WTMgrDefContextEx failed.", "MgrTest", MB_ICONHAND | MB_OK);
return;
}
if( !WTGet( hCtx, &log ) ) {
MessageBox(hWnd, "WTGet failed.", "MgrTest", MB_ICONHAND | MB_OK);
return;
}
hCtx = WTMgrDefContext(hMgr,fSys);
if( !WTSet( hCtx, &log ) ) {
MessageBox(hWnd, "WTSet failed.", "MgrTest", MB_ICONHAND | MB_OK);
return;
}
/* Test that an innocent WTSet won't inadvertently change defalt_device */
if( id > 0 ) {
log.lcDevice = 0;
hCtx = WTOpen(hWnd, &log, 0);
if( !hCtx ) {
MessageBox(hWnd, "WTOpen failed.", "MgrTest", MB_ICONHAND | MB_OK);
return;
}
if( !WTSet(hCtx, &log) )
MessageBox(hWnd, "WTSet failed.", "MgrTest", MB_ICONHAND | MB_OK);
if( !WTClose(hCtx) )
MessageBox(hWnd, "WTClose failed.", "MgrTest", MB_ICONHAND | MB_OK);
}
/* Test that the change was actually made */
hCtx = WTMgrDefContext(hMgr, fSys);
if( !WTGet( hCtx, &log ) ) {
MessageBox(hWnd, "WTGet failed.", "MgrTest", MB_ICONHAND | MB_OK);
return;
}
if( (int)log.lcDevice == id )
MessageBox(hWnd, "Default device changed.", "MgrTest", MB_ICONINFORMATION | MB_OK);
else
MessageBox(hWnd, "Default device not changed properly.", "MgrTest", MB_ICONHAND | MB_OK);
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
BOOL
CALLBACK ctx_edit_DlgProc( HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam )
{
BOOL fResult;
switch( Msg ) {
case WM_COMMAND:
EndDialog(hDlg, wParam);
fResult = TRUE;
break;
default:
fResult = FALSE;
}
return fResult;
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* If we can't link WTMgrDefContextEx(), use this instead */
HCTX API autofail(HMGR a, UINT b, BOOL c)
{
return 0;
}
/* -------------------------------------------------------------------------- */
LRESULT FAR PASCAL MainWndProc(hWnd, message, wParam, lParam)
HWND hWnd;
unsigned message;
WPARAM wParam;
LPARAM lParam;
{
HCTX hCtx;
FARPROC lpProcDlg;
LRESULT lResult = 0;
static BOOL fCBRTest = FALSE;
BOOL fEnable;
HMENU hMenu;
int i;
WORD id,specver;
HMODULE hModule;
switch (message) {
case WM_CREATE:
hMgr = WTMgrOpen(hWnd, WT_DEFBASE);
if( !hMgr )
MessageBox(hWnd, "WTMgrOpen failed.", "MgrTest", MB_ICONHAND | MB_OK);
lResult = !!hMgr - 1;
/* Try to link WTMgrDefContextEx() */
hModule = GetModuleHandle(
#ifdef _WIN32
"wintab32.dll"
#else
"wintab.dll"
#endif
);
(FARPROC)pWTMgrDefContextEx = GetProcAddress( hModule, "WTMgrDefContextEx" );
if( !pWTMgrDefContextEx ) {
/* Disable features which depend on WTMgrDefContextEx */
pWTMgrDefContextEx = autofail;
EnableWindow( GetDlgItem(hWnd, IDM_DEFDEV_DIG), FALSE );
EnableWindow( GetDlgItem(hWnd, IDM_DEFDEV_SYS), FALSE );
}
break;
case WT_CTXOPEN:
case WT_CTXCLOSE:
case WT_CTXUPDATE:
case WT_CTXOVERLAP:
case WT_PROXIMITY:
InvalidateRect(hWnd, NULL, TRUE);
UpdateWindow(hWnd);
break;
case WT_INFOCHANGE:
FlashWindow(hWnd, TRUE);
hMenu = GetSubMenu(GetSubMenu(GetMenu(hWnd),IDM_EDIT), IDM_CSRMENU);
if (hMenu) {
for (i = 0; WTInfo(WTI_CURSORS+i, CSR_ACTIVE, &fEnable); i++) {
CheckMenuItem(hMenu, IDM_CURSORS + i,
(fEnable ? MF_CHECKED : MF_UNCHECKED));
}
}
FlashWindow(hWnd, FALSE);
InvalidateRect(hWnd, NULL, TRUE);
UpdateWindow(hWnd);
break;
case WM_LBUTTONDOWN:
hCtx = ListPoint(HIWORD(lParam));
if( hCtx ) {
LOGCONTEXT lc;
lpProcDlg = MakeProcInstance(ctx_edit_DlgProc, hInst);
id = DialogBox(hInst, MAKEINTRESOURCE(IDD_CTXEDIT), hWnd, lpProcDlg);
FreeProcInstance(lpProcDlg);
switch( id ) {
case IDC_WTCONFIG:
WTConfig(hCtx, hWnd);
break;
case IDC_BUTTONS:
WTGet(hCtx, &lc);
set_ctx_BtnMask(hWnd, hCtx, &lc);
break;
case IDC_MOVEMASK:
set_ctx_MoveMask(hWnd, hMgr, hCtx);
break;
}
}
break;
case WM_RBUTTONDOWN:
hCtx = ListPoint(HIWORD(lParam));
if (QueryKillCtx(hWnd, hCtx)) {
WTClose(hCtx);
}
break;
case WM_PAINT:
if (hMgr) {
HDC hDC;
PAINTSTRUCT ps;
hDC = BeginPaint(hWnd, &ps);
ListContexts(hDC, &ps);
EndPaint(hWnd, &ps);
}
break;
case WM_COMMAND:
id = GET_WM_COMMAND_ID(wParam, lParam);
if (id >= IDM_DEVICES &&
WTInfo(WTI_DEVICES + id - IDM_DEVICES, DVC_NAME, NULL))
{
WTMgrDeviceConfig(hMgr, id - IDM_DEVICES, hWnd);
}
if (id >= IDM_CURSORS &&
WTInfo(WTI_CURSORS+id-IDM_CURSORS, CSR_ACTIVE, &fEnable))
{
fEnable ^= WTMgrCsrEnable(hMgr, id - IDM_CURSORS, !fEnable);
hMenu = GetSubMenu(GetSubMenu(GetMenu(hWnd), IDM_EDIT),
IDM_CSRMENU);
CheckMenuItem(hMenu, id,
(fEnable ? MF_CHECKED : MF_UNCHECKED));
}
if (id >= IDM_OBTDEVS &&
id < (WORD)(IDM_OBTDEVS + NDevices)) {
/* one of multiple devices. */
ObtSet(id - IDM_OBTDEVS, !ObtGet(id - IDM_OBTDEVS));
CheckMenuItem(hObtMenu, id,
(ObtGet(0) ? MF_CHECKED : MF_UNCHECKED));
}
switch (id)
{
case IDM_ABOUT:
lpProcDlg = MakeProcInstance(About, hInst);
DialogBox(hInst, "AboutBox", hWnd, lpProcDlg);
FreeProcInstance(lpProcDlg);
break;
case IDM_BUTTMAPS:
lpProcDlg = MakeProcInstance(ButtonDlgProc, hInst);
DialogBox(hInst, MAKEINTRESOURCE(IDD_BUTTONS),
hWnd, lpProcDlg);
FreeProcInstance(lpProcDlg);
break;
case IDM_XBUTTMAPS:
set_xBtnMap( hWnd, hMgr );
break;
case IDM_OBT:
/* only one device present. */
ObtSet(0, !ObtGet(0));
hMenu = GetSubMenu(GetMenu(hWnd), IDM_EDIT);
CheckMenuItem(hMenu, id,
(ObtGet(0) ? MF_CHECKED : MF_UNCHECKED));
break;
case IDM_DEFDIG:
/* Open a dialog to choose which device to use, if nessicary */
lpProcDlg = MakeProcInstance(CursInfoDlgProc, hInst);
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hWnd, lpProcDlg, WTI_DDCTXS);
FreeProcInstance(lpProcDlg);
/* Open the Wintab context config dialog */
if (id >= 0) {
int numDevices;
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &numDevices);
if( id < numDevices ) {
hCtx = WTMgrDefContextEx(hMgr, id, 0);
if( !hCtx )
hCtx = WTMgrDefContext(hMgr, 0);
} else
hCtx = WTMgrDefContext(hMgr, 0);
if( hCtx )
WTConfig(hCtx, hWnd);
else
MessageBox(hWnd, "WTMgrDefContext failed.", "MgrTest",
MB_ICONHAND | MB_OK);
}
break;
case IDM_DEFSYS:
/* Open a dialog to choose which device to use, if nessicary */
lpProcDlg = MakeProcInstance(CursInfoDlgProc, hInst);
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hInst, lpProcDlg, WTI_DSCTXS);
FreeProcInstance(lpProcDlg);
/* Open the Wintab context dialog */
if (id >= 0) {
int numDevices;
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &numDevices);
if( id < numDevices ) {
hCtx = WTMgrDefContextEx(hMgr, id, 1);
if( !hCtx )
hCtx = WTMgrDefContext(hMgr, 1);
} else
hCtx = WTMgrDefContext(hMgr, 1);
/* 'Default Device' was the last choice in the dialog */
if( hCtx )
WTConfig(hCtx, hWnd);
else
MessageBox(hWnd, "WTMgrDefContext failed.", "MgrTest",
MB_ICONHAND | MB_OK);
}
break;
case IDM_RESET_DEFDIG:
//Check for version 1.1
WTInfo(WTI_INTERFACE,IFC_SPECVERSION,&specver);
if( ( HIBYTE(specver)>=1) && ( LOBYTE(specver)>=1)){
lpProcDlg = MakeProcInstance(CursInfoDlgProc, hInst);
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hInst, lpProcDlg, WTI_DDCTXS);
FreeProcInstance(lpProcDlg);
if (id >= 0) {
int numDevices;
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &numDevices);
if( id < numDevices ) {
hCtx = WTMgrDefContextEx(hMgr, id, 0);
if( !hCtx )
hCtx = WTMgrDefContext(hMgr, 0);
} else
hCtx = WTMgrDefContext(hMgr, 0);
if( hCtx ) {
if( WTSet(hCtx, 0) )
MessageBox(hWnd, "Error! WTSet(hCtx, 0)"
"returned success.", "MgrTest",
MB_ICONHAND | MB_OK);
if( !WTSet(hCtx, WTP_LPDEFAULT) )
MessageBox(hWnd, "WTSet failed.", "MgrTest",
MB_ICONHAND | MB_OK);
else
MessageBox(hWnd, "WTSet succeeded.", "MgrTest",
MB_OK | MB_ICONINFORMATION);
}else
MessageBox(hWnd, "WTMgrDefContext failed.", "MgrTest",
MB_ICONHAND | MB_OK);
}
}else
MessageBox(hWnd, "This feature is only supported in "
"devices using Wintab specification 1.1 and later.",
"MgrTest", MB_ICONHAND | MB_OK);
break;
case IDM_RESET_DEFSYS:
//Check for version 1.1
WTInfo(WTI_INTERFACE,IFC_SPECVERSION,&specver);
if( ( HIBYTE(specver)>=1) && ( LOBYTE(specver)>=1)){
lpProcDlg = MakeProcInstance(CursInfoDlgProc, hInst);
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INFOLIST),
hInst, lpProcDlg, WTI_DSCTXS);
FreeProcInstance(lpProcDlg);
if (id >= 0) {
int numDevices;
WTInfo(WTI_INTERFACE, IFC_NDEVICES, &numDevices);
if( id < numDevices ) {
hCtx = WTMgrDefContextEx(hMgr, id, 1);
if( !hCtx )
hCtx = WTMgrDefContext(hMgr, 1);
} else
hCtx = WTMgrDefContext(hMgr, 1);
if( hCtx ) {
if( WTSet(hCtx, 0) )
MessageBox(hWnd, "Error! WTSet(hCtx, 0) "
"returned success.", "MgrTest", MB_ICONHAND | MB_OK);
if( !WTSet(hCtx, WTP_LPDEFAULT) )
MessageBox(hWnd, "WTSet failed.", "MgrTest",
MB_ICONHAND | MB_OK);
else
MessageBox(hWnd, "WTSet succeeded.", "MgrTest",
MB_OK | MB_ICONINFORMATION);
} else
MessageBox(hWnd, "WTMgrDefContext failed.", "MgrTest",
MB_ICONHAND | MB_OK);
}
}else
MessageBox(hWnd, "This feature is only supported in "
"devices using Wintab specification 1.1 and later.",
"MgrTest", MB_ICONHAND | MB_OK);
break;
case IDM_DEFDEV_DIG:
//Check for version 1.1
WTInfo(WTI_INTERFACE,IFC_SPECVERSION,&specver);
if( ( HIBYTE(specver)>=1) && ( LOBYTE(specver)>=1)){
set_default_device( hWnd, 0 );
}else{
MessageBox(hWnd, "This feature is only supported in "
"devices using Wintab specification 1.1 and later.",
"MgrTest", MB_ICONHAND | MB_OK);
}
break;
case IDM_DEFDEV_SYS:
//Check for version 1.1
WTInfo(WTI_INTERFACE,IFC_SPECVERSION,&specver);
if( ( HIBYTE(specver)>=1) && ( LOBYTE(specver)>=1)){
set_default_device( hWnd, 1 );
}else{
MessageBox(hWnd, "This feature is only supported in "
"devices using Wintab specification 1.1 and later.",
"MgrTest", MB_ICONHAND | MB_OK);
}
break;
case IDM_CSRMASK_DIG:
set_default_CsrMask( hWnd, hMgr, 0 );
break;
case IDM_CSRMASK_SYS:
set_default_CsrMask( hWnd, hMgr, 1 );
break;
case IDM_XBTN_DIG:
set_default_BtnMask( hWnd, hMgr, 0 );
break;
case IDM_XBTN_SYS:
set_default_BtnMask( hWnd, hMgr, 1 );
break;
case IDM_CBRTEST:
if (ConfigReplace(hMgr, !fCBRTest,
"MgrDLL.DLL", "CBRTestProc")) {
fCBRTest = !fCBRTest;
}
CheckMenuItem(GetSubMenu(GetMenu(hWnd), IDM_TEST),
IDM_CBRTEST, (fCBRTest ? MF_CHECKED : MF_UNCHECKED));
break;
case IDM_BMSTEST:
BMSTest(hWnd);
break;
case IDM_PMSTEST:
PMSTest(hWnd);
break;
case IDM_PRSTEST:
PRSTest(hWnd);
break;
case IDM_HMGRTEST:
HMGRTest(hWnd);
break;
default:
return (DefWindowProc(hWnd, message, wParam, lParam));
}
break;
case WM_DESTROY:
if (fCBRTest) {
ConfigReplace(hMgr, FALSE, NULL, NULL);
}
if (hMgr)
WTMgrClose(hMgr);
if (LoadLibraryWorked(hWintab))
FreeLibrary(hWintab);
PostQuitMessage(0);
break;
default:
return (DefWindowProc(hWnd, message, wParam, lParam));
}
return lResult;
}
/* -------------------------------------------------------------------------- */
BOOL FAR PASCAL About(hDlg, message, wParam, lParam)
HWND hDlg;
unsigned message;
WPARAM wParam;
LPARAM lParam;
{
switch (message) {
case WM_INITDIALOG:
return (TRUE);
case WM_COMMAND:
if (GET_WM_COMMAND_ID(wParam, lParam) == IDOK
|| GET_WM_COMMAND_ID(wParam, lParam) == IDCANCEL) {
EndDialog(hDlg, TRUE);
return (TRUE);
}
break;
}
return (FALSE);
}
/* -------------------------------------------------------------------------- */

View File

@@ -0,0 +1,70 @@
#include <wintab.h>
#define IDM_TEST 0
#define IDM_EDIT 1
#define IDM_DEFCTX 2
#define IDM_DEFSCTX 3
#define IDM_HELP 4
#define IDM_CSRMENU 3
#define IDM_ABOUT 10
#define IDM_DEFDIG 11
#define IDM_DEFSYS 12
#define IDM_CBRTEST 13
#define IDM_BMSTEST 14
#define IDM_PMSTEST 15
#define IDM_PRSTEST 16
#define IDM_BUTTMAPS 17
#define IDM_OBT 18
#define IDM_DEVICES 20
#define IDM_CURSORS 30
#define IDM_OBTDEVS 40
#define IDM_RESET_DEFDIG 40005
#define IDM_RESET_DEFSYS 40006
#define IDM_HMGRTEST 40007
#define IDM_DEFDEV_DIG 40009
#define IDM_DEFDEV_SYS 40010
#define IDM_XBTN_DIG 40011
#define IDM_XBTN_SYS 40012
#define IDM_CSRMASK_DIG 40013
#define IDM_CSRMASK_SYS 40014
/* For IDD_INFOLIST */
#define LBC_TITLE 3
#define LBC_LISTBOX 4
#define LBC_BASECAT 5
int PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
BOOL InitApplication(HANDLE);
BOOL InitInstance(HANDLE, int);
LRESULT FAR PASCAL MainWndProc(HWND, unsigned, WPARAM, LPARAM);
BOOL FAR PASCAL About(HWND, unsigned, WPARAM, LPARAM);
/* If the exe imports WTMgrDefContextEx(), then we won't be able to run with
older Wintab.dll/Wintab32.dll's which are don't support Wintab Spec 1.1.
Instead, we'll try to GetProcAddress it ourselves. On failure, just disable
features that depend on it. */
extern HCTX (API * pWTMgrDefContextEx)(HMGR, UINT, BOOL);
#define WTMgrDefContextEx( a, b, c ) pWTMgrDefContextEx( (a), (b), (c) )
BOOL CALLBACK CursInfoDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam);
void set_ctx_BtnMask( HWND hWnd, HCTX hCtx, LOGCONTEXT * lc );
void set_ctx_MoveMask( HWND hWnd, HMGR hMgr, HCTX hCtx );
/* tests.c */
void BMSTest(HWND hWnd);
void PMSTest(HWND hWnd);
void PRSTest(HWND hWnd);
void HMGRTest(HWND hWnd);
/* test_bitboxes() - use a static text box for selecting/changing a list of bits, hex bytes,
or other evenly spaced things. */
/* LOWORD(pos) = x coord */
/* HIWORD(pos) = y coord */
/* box_id = an array of dialog ID's, one for each box */
/* ndiv = number of divisions per box */
/* nboxes = number of boxes */
/* return value = selection number or -1 if point is outside of all boxes */
int test_bitboxes( HWND hDlg, unsigned long pos, unsigned ndiv, int nboxes, const int *box_id );

View File

@@ -0,0 +1,416 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
#include "mgrtest.h"
#include "mgrdlg.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
MGRTESTMENU MENU DISCARDABLE
BEGIN
POPUP "&Test"
BEGIN
MENUITEM "&Config Box Replacement", IDM_CBRTEST
MENUITEM "Pressure Button &Marks Setting", IDM_PMSTEST
MENUITEM "Pressure &Response Setting", IDM_PRSTEST
MENUITEM "&Old Handle Test", IDM_HMGRTEST
END
POPUP "&Edit"
BEGIN
POPUP "&Default Contexts"
BEGIN
MENUITEM "&Digitizing...", IDM_DEFDIG
MENUITEM "&System...", IDM_DEFSYS
END
POPUP "&Reset Default Context"
BEGIN
MENUITEM "&Digitizing...", IDM_RESET_DEFDIG
MENUITEM "&System...", IDM_RESET_DEFSYS
END
POPUP "Set Default De&vice"
BEGIN
MENUITEM "&Digitizing...", IDM_DEFDEV_DIG
MENUITEM "&System...", IDM_DEFDEV_SYS
END
POPUP "Set &CsrMask"
BEGIN
MENUITEM "&Digitizing...", IDM_CSRMASK_DIG
MENUITEM "&System...", IDM_CSRMASK_SYS
END
POPUP "Set &xBtnMask"
BEGIN
MENUITEM "&Digitizing...", IDM_XBTN_DIG
MENUITEM "&System...", IDM_XBTN_SYS
END
MENUITEM "Cursor &Button Maps", IDM_BUTTMAPS
MENUITEM "Extended Cursor Button Maps", IDM_XBUTTMAPS
MENUITEM "&Out of Bounds Tracking", IDM_OBT
END
POPUP "&Help"
BEGIN
MENUITEM "&About MgrTest...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_INFOLIST DIALOG DISCARDABLE 76, 28, 199, 132
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "%s Choice"
FONT 8, "Helv"
BEGIN
LTEXT " %s to Use:",LBC_TITLE,24,6,126,12
CONTROL "",-1,"Static",SS_BLACKFRAME,24,4,146,16
PUSHBUTTON "OK",IDOK,24,104,40,14
PUSHBUTTON "Cancel",IDCANCEL,130,104,40,14
LISTBOX LBC_LISTBOX,24,30,146,58,LBS_SORT | WS_VSCROLL |
WS_TABSTOP
LTEXT "Hide me!",LBC_BASECAT,78,104,36,8,NOT WS_VISIBLE |
WS_DISABLED
END
ABOUTBOX DIALOG DISCARDABLE 22, 17, 144, 95
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About MgrTest"
FONT 8, "MS Sans Serif"
BEGIN
CTEXT "Microsoft Windows",IDC_STATIC,0,5,144,8
CTEXT "MgrTest Application",IDC_STATIC,0,14,144,8
CTEXT "Version 3.01",IDC_STATIC,0,30,144,8
DEFPUSHBUTTON "OK",IDOK,55,70,32,14,WS_GROUP
LTEXT "Copyright 1998 LCS/Telegraphics",IDC_STATIC,17,48,110,
10
END
IDD_BUTTONS DIALOG DISCARDABLE 105, 65528, 145, 205
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Cursor/Button Settings"
FONT 8, "Helv"
BEGIN
LTEXT "&Cursor",-1,12,9,22,8
COMBOBOX IDC_CURSORS,12,18,120,53,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Physical &Buttons",-1,12,33,55,8
COMBOBOX IDC_NAMES,12,42,120,53,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "&Logical Buttons",-1,12,77,55,8
COMBOBOX IDC_LOGICAL,12,86,120,53,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "&Mouse Action",-1,12,123,55,8
COMBOBOX IDC_MOUSE,12,132,120,53,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "&Pen Action",-1,12,147,37,8
COMBOBOX IDC_PEN,12,156,120,53,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
PUSHBUTTON "OK",IDOK,6,185,40,14
PUSHBUTTON "Cancel",IDCANCEL,52,185,40,14,WS_GROUP
PUSHBUTTON "&Default",IDC_DEFAULT,98,185,40,14,WS_GROUP
CONTROL "",107,"Static",SS_BLACKFRAME,6,6,132,55
CONTROL "",108,"Static",SS_BLACKFRAME,6,74,132,32
CONTROL "",109,"Static",SS_BLACKFRAME,6,120,132,56
END
IDD_BTNMASKS DIALOG DISCARDABLE 27, 41, 227, 317
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Button Packet Masks"
FONT 8, "Helv"
BEGIN
DEFPUSHBUTTON "&OK",IDOK,175,10,40,14,WS_GROUP
PUSHBUTTON "&Cancel",IDCANCEL,175,36,40,14
GROUPBOX "xBtnMask Release Events",XBU_BOX,10,199,145,100,
WS_GROUP
GROUPBOX "xBtnMask Press Events",XBD_BOX,10,90,145,100,WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY1,20,105,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY2,20,115,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY3,20,125,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY4,20,135,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY5,20,145,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY6,20,155,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY7,20,165,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBD_DISPLAY8,20,175,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY1,20,215,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY2,20,224,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY3,20,233,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY4,20,242,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY5,20,251,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY6,20,260,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY7,20,269,
130,8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",XBU_DISPLAY8,20,278,
130,8,NOT WS_GROUP
GROUPBOX "BtnMask Press Events",IDC_STATIC,10,10,145,30
LTEXT "00000000000000000000000000000000",BND_DISPLAY,20,25,130,
8,NOT WS_GROUP
LTEXT "00000000000000000000000000000000",BNU_DISPLAY,20,65,130,
8,NOT WS_GROUP
GROUPBOX "BtnMask Release Events",IDC_STATIC,10,50,145,30
END
IDD_CSRMASKS DIALOG DISCARDABLE 27, 41, 227, 201
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Cursor Packet Mask"
FONT 8, "Helv"
BEGIN
DEFPUSHBUTTON "&OK",IDOK,175,10,40,14,WS_GROUP
PUSHBUTTON "&Cancel",IDCANCEL,175,36,40,14
GROUPBOX "CsrMask",-1,10,10,150,175
LTEXT "00000000000000000000000000000000",IDC_TEXT1,20,25,130,8,
NOT WS_GROUP
LTEXT "00000000000000000000000000000000",IDC_TEXT2,20,33,130,8,
NOT WS_GROUP
LTEXT "00000000000000000000000000000000",IDC_TEXT3,20,41,130,8,
NOT WS_GROUP
LTEXT "00000000000000000000000000000000",IDC_TEXT4,20,49,130,8,
NOT WS_GROUP
LISTBOX IDC_CSRLST,20,71,130,103,LBS_MULTIPLESEL |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL
END
IDD_XBUTTONS DIALOG DISCARDABLE 0, 0, 275, 317
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Extended Button Map"
FONT 9, "Fixedsys"
BEGIN
DEFPUSHBUTTON "OK",IDOK,218,8,50,14
PUSHBUTTON "Cancel",IDCANCEL,218,24,50,14
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_1,17,18,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_2,17,26,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_3,17,34,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_4,17,42,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_5,17,50,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_6,17,58,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_7,17,66,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_8,17,74,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_9,17,82,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_10,17,90,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_11,17,98,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_12,17,106,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_13,17,114,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_14,17,122,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_15,17,130,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_SYS_16,17,138,189,8
GROUPBOX "System Button Map",IDC_STATIC,7,8,206,146
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_1,17,176,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_2,17,184,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_3,17,192,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_4,17,200,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_5,17,208,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_6,17,216,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_7,17,224,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_8,17,232,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_9,17,240,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_10,17,248,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_11,17,256,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_12,17,264,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_13,17,272,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_14,17,280,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_15,17,288,189,8
LTEXT "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f",
IDC_LOG_16,17,296,189,8
GROUPBOX "Logical Button Map",IDC_STATIC,7,166,206,144
END
IDD_VALUE DIALOG DISCARDABLE 0, 0, 186, 46
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Change Value"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
EDITTEXT IDC_EDIT,74,16,30,12,ES_AUTOHSCROLL
LTEXT "Enter value:",IDC_STATIC,19,17,39,8
END
IDD_CTXEDIT DIALOG DISCARDABLE 0, 0, 87, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Edit Context"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "WTConfig",IDC_WTCONFIG,10,10,65,15
PUSHBUTTON "Edit Button Masks",IDC_BUTTONS,10,25,65,15
PUSHBUTTON "Edit Move Mask",IDC_MOVEMASK,10,40,65,15
END
IDD_MOVEMASK DIALOG DISCARDABLE 27, 41, 227, 201
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Cursor Packet Mask"
FONT 8, "Helv"
BEGIN
DEFPUSHBUTTON "&OK",IDOK,175,10,40,14,WS_GROUP
PUSHBUTTON "&Cancel",IDCANCEL,175,36,40,14
GROUPBOX "Move Mask",-1,10,10,150,150
LTEXT "00000000000000000000000000000000",IDC_MMTEXT,20,25,130,
8,NOT WS_GROUP
LISTBOX IDC_LST,20,45,130,103,LBS_MULTIPLESEL |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL
END
/////////////////////////////////////////////////////////////////////////////
//
// Data
//
DLGINCLUDE RCDATA DISCARDABLE
BEGIN
"MGRDLG.H\0"
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""mgrtest.h""\r\n"
"#include ""mgrdlg.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_BTNMASKS, DIALOG
BEGIN
BOTTOMMARGIN, 205
END
IDD_XBUTTONS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 268
TOPMARGIN, 8
BOTTOMMARGIN, 310
END
IDD_VALUE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 39
END
IDD_CTXEDIT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 80
TOPMARGIN, 7
BOTTOMMARGIN, 59
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,153 @@
#include <windows.h>
#include "wintab.h"
#include "Mgrtest.h"
#include "resource.h"
static const unsigned textfield[1] = { IDC_MMTEXT };
static const char * pk_tags[] = {
"PK_CONTEXT", "PK_STATUS", "PK_TIME", "PK_CHANGED", "PK_SERIAL_NUMBER", "PK_CURSOR", "PK_BUTTONS",
"PK_X", "PK_Y", "PK_Z", "PK_NORMAL_PRESSURE", "PK_TANGENT_PRESSURE", "PK_ORIENTATION", "PK_ROTATION", 0 };
extern HANDLE hInst;
static void MoveMask_DisplayBits( HWND hDlg, DWORD MoveMask )
{
char buf[33];
unsigned j;
buf[32] = 0;
for( j = 0; j < 32; j++ )
buf[j] = '0' + (char)((MoveMask >> j) & 0x01);
SetWindowText(GetDlgItem(hDlg, IDC_MMTEXT), buf);
}
BOOL
CALLBACK MoveMask_DlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LONG lParam)
{
static DWORD * MoveMask;
BOOL fResult;
int i;
LRESULT val;
switch (Msg) {
case WM_INITDIALOG:
MoveMask = (DWORD *)lParam;
/* List the available cursors, and highlight them if their Csrmask bits are set */
i = 0;
while( pk_tags[i] != NULL ) {
SendDlgItemMessage( hDlg, IDC_LST, LB_ADDSTRING, 0, (LPARAM)((char far *)pk_tags[i]) );
i++;
}
/* for Unknown Reason, sending LB_SETSEL right after LB_ADDSTRING doesn't work reliably */
i = 0;
while( pk_tags[i] != NULL ) {
/* Highlight the name in the selection box */
SendDlgItemMessage( hDlg, IDC_LST, LB_SETSEL, (WPARAM)((*MoveMask >> i) & 0x01), i );
i++;
}
/* Display the Csrmask bitfield bits */
MoveMask_DisplayBits( hDlg, *MoveMask );
fResult = TRUE;
break;
case WM_LBUTTONDOWN:
/* If clicked on a number in IDC_TEXT?, then change it's corrisponding bit */
i = test_bitboxes( hDlg, lParam, 32, 1, textfield );
if( i > -1 ) {
/* Flip the bit */
*MoveMask ^= 1 << i;
MoveMask_DisplayBits( hDlg, *MoveMask );
/* Highlight the corrisponding cursor in the listbox appropriately */
SendDlgItemMessage( hDlg, IDC_LST, LB_SETSEL, (WPARAM)((*MoveMask >> i) & 0x01), i );
}
fResult = TRUE;
break;
case WM_COMMAND:
switch( wParam ) {
case IDOK:
EndDialog(hDlg, wParam);
fResult = TRUE;
break;
case IDCANCEL:
EndDialog(hDlg, wParam);
fResult = TRUE;
break;
default:
if( HIWORD(wParam) == LBN_SELCHANGE || wParam == IDC_LST ) {
/* Set all of the bits according to the selection box selections until error */
i = 0;
fResult = FALSE;
while( !fResult ) {
val = SendMessage( (HWND)lParam, LB_GETSEL, i, 0 );
if( val > 0 )
*MoveMask |= 1 << i;
else
if( val == 0 )
*MoveMask &= ~(1 << i);
else
fResult = TRUE;
if( i == 31 )
fResult = TRUE;
i++;
}
/* Redisplay the bits */
MoveMask_DisplayBits( hDlg, *MoveMask );
}
break;
}
break;
default:
fResult = FALSE;
break;
}
return fResult;
}
void
set_ctx_MoveMask( HWND hWnd, HMGR hMgr, HCTX hCtx )
{
FARPROC fpProc;
int id;
LOGCONTEXT lc;
/* Read the button masks */
if( !WTGet( hCtx, &lc ) ) {
MessageBox( hWnd, "WTGet failed.", "MgrTest", MB_ICONHAND | MB_OK );
return;
}
/* Do the button bit dialog */
fpProc = MakeProcInstance( (FARPROC)MoveMask_DlgProc, hInst );
id = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_MOVEMASK), hWnd, fpProc, (LPARAM)((DWORD FAR *)&lc.lcMoveMask));
FreeProcInstance(fpProc);
/* Set the new button masks */
if( id == IDOK ) {
if( !WTSet( hCtx, &lc ) )
MessageBox( hWnd, "WTSet failed.", "MgrTest", MB_ICONHAND | MB_OK );
}
}

View File

@@ -0,0 +1,23 @@
/* ------------------------------- msgpack.h -------------------------------- */
/*------------------------------------------------------------------------------
Selected message unpacking macros from windowsx.h
to circumvent compile-time memory headaches.
------------------------------------------------------------------------------*/
#ifdef WIN32
#define GET_WM_ACTIVATE_STATE(wp, lp) LOWORD(wp)
#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
#define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp)
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
#define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \
(void)(fn)((hwnd), WM_COMMAND, MAKEWPARAM((UINT)(id),(UINT)(codeNotify)), (LPARAM)(HWND)(hwndCtl))
/* -------------------------------------------------------------------------- */
#else
#define GET_WM_ACTIVATE_STATE(wp, lp) (wp)
#define GET_WM_COMMAND_ID(wp, lp) (wp)
#define GET_WM_COMMAND_HWND(wp, lp) (HWND)LOWORD(lp)
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(lp)
#define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \
(void)(fn)((hwnd), WM_COMMAND, (WPARAM)(int)(id), MAKELPARAM((UINT)(hwndCtl), (codeNotify)))
/* -------------------------------------------------------------------------- */
#endif


View File

@@ -0,0 +1,71 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by mgrtest.rc
//
#define IDD_INFOLIST 103
#define IDD_XBUTTONS 105
#define IDD_VALUE 106
#define IDD_CTXEDIT 107
#define XBU_BOX 168
#define XBD_BOX 169
#define IDD_CSRMASKS 601
#define IDD_MOVEMASK 602
#define BND_DISPLAY 685
#define BNU_DISPLAY 686
#define IDC_TEXT2 686
#define IDC_TEXT3 687
#define IDC_TEXT4 688
#define IDC_TEXT1 1002
#define IDC_CSRLST 1003
#define IDC_SYS_1 1004
#define IDC_SYS_2 1005
#define IDC_SYS_3 1006
#define IDC_SYS_4 1007
#define IDC_SYS_5 1008
#define IDC_SYS_6 1009
#define IDC_SYS_7 1010
#define IDC_SYS_8 1011
#define IDC_SYS_9 1012
#define IDC_SYS_10 1013
#define IDC_SYS_11 1014
#define IDC_SYS_12 1015
#define IDC_SYS_13 1016
#define IDC_SYS_14 1017
#define IDC_SYS_15 1018
#define IDC_SYS_16 1019
#define IDC_LOG_1 1020
#define IDC_LOG_2 1021
#define IDC_LOG_3 1022
#define IDC_LOG_4 1023
#define IDC_LOG_5 1024
#define IDC_LOG_6 1025
#define IDC_LOG_7 1026
#define IDC_LOG_8 1027
#define IDC_LOG_9 1028
#define IDC_LOG_10 1029
#define IDC_LOG_11 1030
#define IDC_LOG_12 1031
#define IDC_LOG_13 1032
#define IDC_LOG_14 1033
#define IDC_LOG_15 1034
#define IDC_LOG_16 1035
#define IDC_EDIT 1036
#define IDC_WTCONFIG 1039
#define IDC_BUTTONS 1040
#define IDC_MOVEMASK 1041
#define IDC_LST 1042
#define IDC_MMTEXT 1046
#define IDM_XBUTTMAPS 40015
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 108
#define _APS_NEXT_COMMAND_VALUE 40016
#define _APS_NEXT_CONTROL_VALUE 1048
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,305 @@
/* Various tests to check if Wintab is acting as we would expect */
#include <windows.h>
#include "wintab.h"
extern HMGR hMgr;
extern HMODULE hWintab;
extern char szWintab[];
#ifdef WIN32
#define LoadLibraryWorked(h) (h)
#else
#define LoadLibraryWorked(h) (h >= HINSTANCE_ERROR)
#endif
/* -------------------------------------------------------------------------- */
BOOL BtnMarks(HMGR h, UINT c, UINT FAR *n, UINT FAR *t)
{
typedef BOOL (API *BM)(HMGR, UINT, DWORD, DWORD);
typedef BOOL (API *BMX)(HMGR, UINT, UINT FAR *, UINT FAR *);
static BM bm = NULL;
static BMX bmx = NULL;
/* if not got wintab handle... */
if (!hWintab)
/* get wintab handle. */
hWintab = LoadLibrary(szWintab);
/* failsafe. */
if (!LoadLibraryWorked(hWintab))
return FALSE;
/* if not got a proc... */
if (!bmx && !bm) {
/* try for portable version. */
bmx = (BMX)GetProcAddress(hWintab, "WTMgrCsrPressureBtnMarksEx");
/* if no portable version... */
if (!bmx)
/* try for non-portable version. */
bm = (BM)GetProcAddress(hWintab, "WTMgrCsrPressureBtnMarks");
}
/* failsafe. */
if (!bmx && !bm)
return FALSE;
/* if portable version... */
if (bmx) {
/* call it. */
return bmx(h, c, n, t);
}
else {
/* convert arguments and call non-portable version. */
DWORD dwN, dwT;
if (!n)
dwN = 0;
else if (n == WTP_LPDEFAULT)
dwN = WTP_DWDEFAULT;
else
dwN = *(DWORD FAR *)n;
if (!t)
dwT = 0;
else if (t == WTP_LPDEFAULT)
dwT = WTP_DWDEFAULT;
else
dwT = *(DWORD FAR *)t;
return bm(h, c, dwN, dwT);
}
}
/* -------------------------------------------------------------------------- */
void BMSTest(HWND hWnd)
{
typedef BYTE MAP[32];
static MAP logSave, sysSave, logTest, sysTest, logPatt, sysPatt;
int i;
BOOL fResult;
char buf[200];
/* set up funky test patterns. */
for (i = 0; i < sizeof(MAP); i++) {
logPatt[i] = 31;
sysPatt[i] = SBN_LDRAG;
}
/* loop over cursors... */
for (i = 0; WTInfo(WTI_CURSORS + i, CSR_NAME, NULL); i++) {
/* save the current maps. */
WTInfo(WTI_CURSORS + i, CSR_BUTTONMAP, logSave);
WTInfo(WTI_CURSORS + i, CSR_SYSBTNMAP, sysSave);
/* if the function thinks it succeeded... */
if (fResult = WTMgrCsrButtonMap(hMgr, i, logPatt, sysPatt)) {
/* get the resulting maps. */
WTInfo(WTI_CURSORS + i, CSR_BUTTONMAP, logTest);
WTInfo(WTI_CURSORS + i, CSR_SYSBTNMAP, sysTest);
/* put back the originals. */
WTMgrCsrButtonMap(hMgr, i, logSave, sysSave);
/* compare what we sent with what we got. */
fResult = (!memcmp(logTest, logPatt, sizeof(MAP)) &&
!memcmp(sysTest, sysPatt, sizeof(MAP)));
}
/* report the results. */
wsprintf(buf, "WTMgrCsrButtonMap() Test %s for Cursor %d.",
(LPSTR)(fResult ? "Succeeded" : "Failed"), i);
MessageBox(hWnd, buf, "MgrTest", MB_ICONINFORMATION | MB_OK);
}
}
/* -------------------------------------------------------------------------- */
void PMSTest(HWND hWnd)
{
UINT nSave[2], tSave[2], nTest[2], tTest[2], nPatt[2], tPatt[2];
int i;
BOOL fResult;
BOOL fN, fT;
char buf[200];
/* set up funky test patterns. */
nPatt[0] = tPatt[0] = 1;
nPatt[1] = tPatt[1] = 2;
/* loop over cursors... */
for (i = 0; WTInfo(WTI_CURSORS + i, CSR_NAME, NULL); i++) {
/* check which channels to test. */
fN = !!WTInfo(WTI_CURSORS + i, CSR_NPBTNMARKS, NULL);
fT = !!WTInfo(WTI_CURSORS + i, CSR_TPBTNMARKS, NULL);
if (!fN && !fT) {
fResult = !BtnMarks(hMgr, i, NULL, NULL);
fResult &= !BtnMarks(hMgr, i, nPatt, NULL);
fResult &= !BtnMarks(hMgr, i, NULL, tPatt);
fResult &= !BtnMarks(hMgr, i, nPatt, tPatt);
}
else
{
/* save the current maps. */
if (fN)
WTInfo(WTI_CURSORS + i, CSR_NPBTNMARKS, nSave);
if (fT)
WTInfo(WTI_CURSORS + i, CSR_TPBTNMARKS, tSave);
/* if the function thinks it succeeded... */
if (BtnMarks(hMgr, i, (fN ? (LPVOID)nPatt : NULL),
(fT ? (LPVOID)tPatt : NULL))) {
/* get the resulting maps. */
if (fN)
WTInfo(WTI_CURSORS + i, CSR_NPBTNMARKS, nTest);
if (fT)
WTInfo(WTI_CURSORS + i, CSR_TPBTNMARKS, tTest);
/* put back the originals. */
BtnMarks(hMgr, i, (fN ? (LPVOID)nSave : NULL),
(fT ? (LPVOID)tSave : NULL));
/* compare what we sent with what we got. */
fResult = TRUE;
if (fN)
fResult &= !memcmp(nTest, nPatt, sizeof(nTest));
if (fT)
fResult &= !memcmp(tTest, tPatt, sizeof(tTest));
}
else
fResult = FALSE;
}
/* report the results. */
wsprintf(buf, "WTMgrCsrPressureBtnMarks() Test %s for Cursor %d.",
(LPSTR)(fResult ? "Succeeded" : "Failed"), i);
MessageBox(hWnd, buf, "MgrTest", MB_ICONINFORMATION | MB_OK);
}
}
/* -------------------------------------------------------------------------- */
void PRSTest(HWND hWnd)
{
typedef UINT CURVE[256];
static CURVE nSave, tSave, nTest, tTest, nPatt, tPatt;
int nSize, tSize;
int i, j;
BOOL fResult;
BOOL fN, fT;
AXIS p;
char buf[200];
/* loop over devices... */
for (j = 0; WTInfo(WTI_DEVICES + j, DVC_FIRSTCSR, &i); j++) {
int k;
/* set up funky test patterns. */
if (WTInfo(WTI_DEVICES + j, DVC_NPRESSURE, &p)) {
nSize = (int)(p.axMax - p.axMin);
for (k = 0; k < nSize; k++)
nPatt[k] = (k ? (UINT)p.axMax : (UINT)p.axMin);
}
if (WTInfo(WTI_DEVICES + j, DVC_TPRESSURE, &p)) {
tSize = (int)(p.axMax - p.axMin);
for (k = 0; k < tSize; k++)
tPatt[k] = (k ? (UINT)p.axMax : (UINT)p.axMin);
}
/* loop over cursors... */
for (; WTInfo(WTI_CURSORS + i, CSR_NAME, NULL); i++) {
/* check which channels to test. */
fN = !!WTInfo(WTI_CURSORS + i, CSR_NPRESPONSE, NULL);
fT = !!WTInfo(WTI_CURSORS + i, CSR_TPRESPONSE, NULL);
if (!fN && !fT) {
fResult = !WTMgrCsrPressureResponse(hMgr, i, NULL, NULL);
fResult &= !WTMgrCsrPressureResponse(hMgr, i, nPatt, NULL);
fResult &= !WTMgrCsrPressureResponse(hMgr, i, NULL, tPatt);
fResult &= !WTMgrCsrPressureResponse(hMgr, i, nPatt, tPatt);
}
else
{
/* save the current maps. */
if (fN)
WTInfo(WTI_CURSORS + i, CSR_NPRESPONSE, nSave);
if (fT)
WTInfo(WTI_CURSORS + i, CSR_TPRESPONSE, tSave);
/* if the function thinks it succeeded... */
if (WTMgrCsrPressureResponse(hMgr, i,
(fN ? (LPVOID)nPatt : NULL),
(fT ? (LPVOID)tPatt : NULL))) {
/* get the resulting maps. */
if (fN)
WTInfo(WTI_CURSORS + i, CSR_NPRESPONSE, &nTest);
if (fT)
WTInfo(WTI_CURSORS + i, CSR_TPRESPONSE, &tTest);
/* put back the originals. */
WTMgrCsrPressureResponse(hMgr, i,
(fN ? (LPVOID)nSave : NULL),
(fT ? (LPVOID)tSave : NULL));
/* compare what we sent with what we got. */
fResult = TRUE;
if (fN)
fResult &= !memcmp(&nTest, &nPatt, sizeof(nTest));
if (fT)
fResult &= !memcmp(&tTest, &tPatt, sizeof(nTest));
}
else
fResult = FALSE;
}
/* report the results. */
wsprintf(buf, "WTMgrCsrPressureResponse() Test %s for Cursor %d.",
(LPSTR)(fResult ? "Succeeded" : "Failed"), i);
MessageBox(hWnd, buf, "MgrTest", MB_ICONINFORMATION | MB_OK);
}
}
}
/* -------------------------------------------------------------------------- */
void HMGRTest(HWND hWnd)
{
BOOL success = 1;
HMGR old_hMgr = hMgr;
HMGR new_hMgr;
new_hMgr = WTMgrOpen(hWnd, WT_DEFBASE);
if( !new_hMgr ) {
MessageBox(hWnd, "WTMgrOpen failed.", "MgrTest", MB_ICONHAND | MB_OK);
success = 0;
} else {
HCTX old_hCtx = WTMgrDefContext(old_hMgr, 0);
HCTX new_hCtx = WTMgrDefContext(new_hMgr, 0);
LOGCONTEXT ctx;
if( !old_hCtx || !new_hCtx ) {
MessageBox(hWnd, "WTMgrDefContext failed.", "MgrTest", MB_ICONHAND | MB_OK);
success = 0;
}
if( !WTGet(old_hCtx, &ctx) || !WTGet(old_hCtx, &ctx) ) {
MessageBox(hWnd, "WTGet failed before WTMgrClose called.", "MgrTest", MB_ICONHAND | MB_OK);
success = 0;
}
if( !WTMgrClose(old_hMgr) ) {
MessageBox(hWnd, "WTMgrClose failed.", "MgrTest", MB_ICONHAND | MB_OK);
success = 0;
}
if( WTGet(old_hCtx, &ctx) ) {
MessageBox(hWnd, "Error! WTGet returned success on context handle from a closed manager.", "MgrTest", MB_ICONHAND | MB_OK);
success = 0;
}
if( !WTGet(new_hCtx, &ctx) ) {
MessageBox(hWnd, "WTGet failed for new_hCtx after WTMgrClose(old_hMgr).", "MgrTest", MB_ICONHAND | MB_OK);
success = 0;
}
hMgr = new_hMgr;
}
if( success )
MessageBox(hWnd, "Test Passed.", "MgrTest", MB_ICONINFORMATION | MB_OK);
}

View File

@@ -0,0 +1,17 @@
# If no CPUTYPE variable is defined, then we are running on a DOS system
# so lets whack in some flags and switches to match the NTWIN32.MAK
# settings:
srcdir=..
model=S
rc=rc
hcopts = -n
cc = cl
cdebug = -Zipel -Od
cflags = -c -A$(model) -Gsw -W3 $(cdebug)
cvars = -D$(ENV)
rcvars = -i..\..\..\include
linkdebug =
link = link $(linkdebug)
guiflags = /NOE /NOD /CO /align:16
guilibs = libw $(model)libcew ver commdlg
guilibsdll = libw $(model)dllcew ver commdlg

View File

@@ -0,0 +1,108 @@
!IF "$(CPU)" != ""
OS=NT
ENV=WIN32
!ELSE
OS=DOS
ENV=WIN16
!ENDIF
# Environment variables LIB and INCLUDE should point to your Win SDK libraries
# and include files.
# Define WINTAB to point to your wintab development tree
# Example: WINTAB=c:\wintab
WINTAB=..\..\..
!include "$(OS)$(ENV).MAK"
cinclude=-I$(srcdir) -I$(WINTAB)\include
proj = MGRTEST
projdll = MGRDLL
all: $(proj).exe $(projdll).dll
# force a complete rebuild from source.
cleanall: clean
-del *.exe
-del *.dll
#clean up everything but the .EXEs.
clean:
-del *.lib
-del *.exp
-del *.res
-del *.?bj
-del *.map
# Update the resource if necessary
$(proj).res: $(srcdir)\$(proj).rc $(srcdir)\mgrdlg.dlg $(srcdir)\mgrdlg.h $(srcdir)\$(proj).h
$(rc) $(rcvars) -r -fo $(proj).res $(cvars) $(srcdir)\$(proj).rc
!if defined(CPU)
cvtres -$(CPU) $(proj).res -o $(proj).rbj
!ENDIF
OBJS = $(proj).obj mgrdlg.obj bitbox.obj btnMap.obj Csrmask.obj Infodlg.obj MoveMask.obj tests.obj BtnMask.obj
# Update the object files if necessary
$(proj).obj: $(srcdir)\$(proj).c $(srcdir)\$(proj).h $(srcdir)\mgrdlg.h
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\$(proj).c $(srcdir)\$(proj).h $(srcdir)\mgrdlg.h
mgrdlg.obj: $(srcdir)\mgrdlg.c $(srcdir)\mgrdlg.h
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\mgrdlg.c $(srcdir)\mgrdlg.h
mgrdll.obj: $(srcdir)\mgrdll.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\mgrdll.c
bitbox.obj: $(srcdir)\bitbox.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\bitbox.c
btnMap.obj: $(srcdir)\btnMap.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\btnMap.c
btnMask.obj: $(srcdir)\btnMask.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\btnMask.c
Infodlg.obj: $(srcdir)\Infodlg.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\Infodlg.c
MoveMask.obj: $(srcdir)\MoveMask.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\MoveMask.c
tests.obj: $(srcdir)\tests.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\tests.c
Csrmask.obj: $(srcdir)\Csrmask.c
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\Csrmask.c
# Update the exp file if necessary.
$(projdll).exp $(projdll).lib: $(projdll).obj $(projdll).def
$(implib) -machine:$(CPU) \
-def:$(projdll).def \
-out:$(projdll).lib $(projdll).obj -verbose
# Since the link line has some severe differences depending on what
# platform we are running on, we need to special case this so that
# we execute the correct commands:
!if defined(CPU)
# This is for Windows NT:
$(proj).exe: $(OBJS) $(proj).res $(proj).def
$(link) $(linkdebug) $(guiflags) $(OBJS) \
$(WINTAB)\lib\$(CPU)\wintab32.lib $(guilibs) VERSION.LIB \
$(proj).rbj -out:$(proj).exe /machine:$(CPU)
$(projdll).dll: $(projdll).obj $(projdll).def $(projdll).exp
$(link) $(linkdebug) $(guiflags) $(projdll).obj $(projdll).exp \
$(guilibsdll) VERSION.LIB -out:$(projdll).dll \
/machine:$(CPU) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
!ENDIF
!if !defined(CPU)
# This is for Windows DOS:
$(proj).exe: $(OBJS) $(proj).res $(proj).def
$(link) $(guiflags) $(OBJS) ,,, $(WINTAB)\lib\wintab.lib $(guilibs) , $(proj).DEF
rc $(proj).res
$(projdll).dll: $(projdll).obj $(projdll).def
$(link) $(guiflags) libentry.obj $(projdll).obj ,$(projdll).dll,, \
$(WINTAB)\lib\wintab.lib $(guilibsdll) , $(projdll).DEF
rc $(projdll).dll
!ENDIF

View File

@@ -0,0 +1,10 @@
LIBRARY MGRDLL
DESCRIPTION 'MGRTEST.DLL: Config Box Replace Test DLL'
EXETYPE WINDOWS
CODE PRELOAD DISCARDABLE
DATA FIXED SINGLE PRELOAD
EXPORTS
WEP @1 RESIDENTNAME
CBRTestProc


View File

@@ -0,0 +1,31 @@
; module-definition file for mgrtest -- used by LINK.EXE
NAME MgrTest ; application's module name
DESCRIPTION 'Sample Microsoft Windows Application'
EXETYPE WINDOWS ; required for all Windows applications
STUB 'WINSTUB.EXE' ; Generates error message if application
; is run without Windows
;CODE can be moved in memory and discarded/reloaded
CODE PRELOAD MOVEABLE DISCARDABLE
;DATA must be MULTIPLE if program can be invoked more than once
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 1024
STACKSIZE 5120 ; recommended minimum for Windows applications
; All functions that will be called by any Windows routine
; MUST be exported.
EXPORTS
MainWndProc @1 ; name of window processing function
About @2 ; name of "About" processing function
Do1Context ; enumeration callback function
ButtonDlgProc


View File

@@ -0,0 +1,414 @@
# =========================================================================
# NTWIN32.MAK - Win32 application master NMAKE definitions file for the
# Microsoft Win32 SDK for Windows NT programming samples
# -------------------------------------------------------------------------
# This files should be included at the top of all MAKEFILEs as follows:
# !include <ntwin32.mak>
# -------------------------------------------------------------------------
# NMAKE Options
#
# Use the table below to determine the additional options for NMAKE to
# generate various application debugging, profiling and performance tuning
# information.
#
# Application Information Type Invoke NMAKE
# ---------------------------- ------------
# For No Debugging Info nmake nodebug=1
# For Working Set Tuner Info nmake tune=1
# For Call Attributed Profiling Info nmake profile=1
#
# Note: Working Set Tuner and Call Attributed Profiling is for available
# for the Intel x86 and Pentium systems.
#
# Note: The three options above are mutually exclusive (you may use only
# one to compile/link the application).
#
# Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an
# alternate method to setting these options via the nmake command line.
#
# Additional NMAKE Options Invoke NMAKE
# ---------------------------- ------------
# For No ANSI NULL Compliance nmake no_ansi=1
# (ANSI NULL is defined as PVOID 0)
#
# =========================================================================
# REVISIONS
# RICO 1/26/95 - changed -Zi to -Z7 for use with VC++ 2.0.
# RICO 6/16/97 - changed -Ox to -O1 to avoid VC++ 4.x optimizer bug.
# =========================================================================
# -------------------------------------------------------------------------
# Get CPU Type - exit if CPU environment variable is not defined
# -------------------------------------------------------------------------
!IF "$(CPU)" == ""
CPU = $(PROCESSOR_ARCHITECTURE)
!ENDIF
!IF "$(CPU)" != "i386"
!IF "$(CPU)" != "MIPS"
!IF "$(CPU)" != "ALPHA"
!IF "$(CPU)" != "PPC"
!ERROR Must specify CPU environment variable ( CPU=i386, CPU=MIPS, CPU=ALPHA, CPU=PPC)
!ENDIF
!ENDIF
!ENDIF
!ENDIF
# -------------------------------------------------------------------------
# Platform Dependent Binaries Declarations
#
# If you are using the old MIPS compiler then define the following:
# cc = cc
# cvtobj = mip2coff
# -------------------------------------------------------------------------
# binary declarations for use on Intel i386, i486, and Pentium systems
!IF "$(CPU)" == "i386"
cc = cl
# for compatibility with older-style makefiles
cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
!ENDIF
# binary declarations for use on self hosted MIPS R4x000 systems
!IF "$(CPU)" == "MIPS"
cc = mcl
# for compatibility with older-style makefiles
cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
!ENDIF
# binary declarations for use on self hosted Digital Alpha AXP systems
!IF "$(CPU)" == "ALPHA"
cc = cl
# for compatibility with older-style makefiles
cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!!
!ENDIF
# binary declarations common to all platforms
link = link
implib = lib
rc = rc
cvtres = cvtres
hc = hc
# -------------------------------------------------------------------------
# Platform Dependent Compile Flags - must be specified after $(cc)
#
# Note: Debug switches are on by default for current release
#
# These switches allow for source level debugging with WinDebug for local
# and global variables.
#
# Both compilers now use the same front end - you must still define either
# _X86_, _MIPS_, or _ALPHA_. These have replaced the i386, MIPS, and ALPHA
# definitions which are not ANSI compliant.
#
# Common compiler flags:
# -c - compile without linking
# -W3 - Set warning level to level 3
# -Zi - generate debugging information
# -Od - disable all optimizations
# -O1 - optimize for minimum size
# -Zd - generate only public symbols and line numbers for debugging
#
# i386 specific compiler flags:
# -Gz - stdcall
#
# MS MIPS specific compiler flags:
# none.
#
# *** OLD MIPS ONLY ***
#
# The following definitions are for the old MIPS compiler:
#
# OLD MIPS compiler flags:
# -c - compile without linking
# -std - produce warnings for non-ANSI standard source code
# -g2 - produce a symbol table for debugging
# -O - invoke the global optimizer
# -EL - produce object modules targeted for
# "little-endian" byte ordering
#
# If you are using the old MIPS compiler then define the following:
#
# # OLD MIPS Complile Flags
# !IF 0
# !IF "$(CPU)" == "MIPS"
# cflags = -c -std -o $(*B).obj -EL -DMIPS=1 -D_MIPS_=1
# !IF defined(NODEBUG)
# cdebug =
# !ELSE
# cdebug = -g2
# !ENDIF
# !ENDIF
# !ENDIF
#
# -------------------------------------------------------------------------
# declarations common to all compiler options
cinclude = -I$(WDEV)\include
ccommon = $(cinclude) -c -W3 -D_CRTAPI1=__cdecl -D_CRTAPI2=__cdecl -Dtry=__try -Dleave=__leave -Dexcept=__except -Dfinally=__finally
!IF "$(CPU)" == "i386"
cflags = $(ccommon) -D_X86_=1
scall = -Gz
!ELSE
!IF "$(CPU)" == "MIPS"
cflags = $(ccommon) -D_MIPS_=1
!ELSE
!IF "$(CPU)" == "PPC"
cflags = $(ccommon) -D_PPC_=1
!ELSE
!IF "$(CPU)" == "ALPHA"
cflags = $(ccommon) -D_ALPHA_=1
!ENDIF
!ENDIF
!ENDIF
scall =
!ENDIF
!IF "$(CPU)" == "i386"
!IF defined(NODEBUG)
cdebug = -O1
!ELSE
!IF defined(PROFILE)
cdebug = -Gh -Zd -O1
!ELSE
!IF defined(TUNE)
cdebug = -Gh -Zd -O1
!ELSE
cdebug = -Z7 -Od
!ENDIF
!ENDIF
!ENDIF
!ELSE
!IF defined(NODEBUG)
cdebug = -O1
!ELSE
cdebug = -Z7 -Od
!ENDIF
!ENDIF
# -------------------------------------------------------------------------
# Target Module & Subsystem Dependent Compile Defined Variables - must be
# specified after $(cc)
#
# The following table indicates the various acceptable combinations of
# the C Run-Time libraries LIBC, LIBCMT, and CRTDLL respect to the creation
# of a EXE and/or DLL target object. The appropriate compiler flag macros
# that should be used for each combination are also listed.
#
# Link EXE Create Exe Link DLL Create DLL
# with Using with Using
# ----------------------------------------------------
# LIBC CVARS None None *
# LIBC CVARS LIBC CVARS
# LIBC CVARS LIBCMT CVARSMT
# LIBCMT CVARSMT None None *
# LIBCMT CVARSMT LIBC CVARS
# LIBCMT CVARSMT LIBCMT CVARSMT
# CRTDLL CVARSDLL None None *
# CRTDLL CVARSDLL LIBC CVARS
# CRTDLL CVARSDLL LIBCMT CVARSMT
# CRTDLL CVARSDLL CRTDLL CVARSDLL *
#
# * - Denotes the Recommended Configuration
#
# When building single-threaded applications you can link your executable
# with either LIBC, LIBCMT, or CRTDLL, although LIBC will provide the best
# performance.
#
# When building multi-threaded applications, either LIBCMT or CRTDLL can
# be used as the C-Runtime library, as both are multi-thread safe.
#
# Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
# also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
# When using DLLs, it is recommended that all of the modules be
# linked with CRTDLL.LIB.
#
# Note: The macros of the form xDLL are used when linking the object with
# the DLL version of the C Run-Time (that is, CRTDLL.LIB). They are
# not used when the target object is itself a DLL.
#
# -------------------------------------------------------------------------
!IF defined(NO_ANSI)
noansi = -DNULL=0
!ENDIF
# for Windows applications that use the C Run-Time libraries
cvars = -DWIN32 $(noansi)
cvarsmt = $(cvars) -D_MT
cvarsdll = $(cvarsmt) -D_DLL
# for compatibility with older-style makefiles
cvarsmtdll = $(cvarsmt) -D_DLL
# for POSIX applications
psxvars = -D_POSIX_
# resource compiler
rcvars = -i..\..\..\include -DWIN32 $(noansi)
# -------------------------------------------------------------------------
# Platform Dependent Link Flags - must be specified after $(link)
#
# Note: $(DLLENTRY) should be appended to each -entry: flag on the link
# line.
#
# Note: When creating a DLL that uses C Run-Time functions it is
# recommended to include the entry point function of the name DllMain
# in the DLL's source code. Also, the MAKEFILE should include the
# -entry:_DllMainCRTStartup$(DLLENTRY) option for the creation of
# this DLL. (The C Run-Time entry point _DllMainCRTStartup in turn
# calls the DLL defined DllMain entry point.)
#
# -------------------------------------------------------------------------
# declarations common to all linker options
lcommon =
# declarations for use on Intel i386, i486, and Pentium systems
!IF "$(CPU)" == "i386"
DLLENTRY = @12
lflags = $(lcommon) -align:0x1000
!ENDIF
# declarations for use on self hosted MIPS R4x000 systems
!IF "$(CPU)" == "MIPS"
DLLENTRY =
lflags = $(lcommon)
!ENDIF
# declarations for use on self hosted PowerPC systems
!IF "$(CPU)" == "PPC"
DLLENTRY =
lflags = $(lcommon)
!ENDIF
# declarations for use on self hosted Digital Alpha AXP systems
!IF "$(CPU)" == "ALPHA"
DLLENTRY =
lflags = $(lcommon)
!ENDIF
# -------------------------------------------------------------------------
# Target Module Dependent Link Debug Flags - must be specified after $(link)
#
# These switches allow the inclusion of the necessary symbolic information
# for source level debugging with WinDebug, profiling and/or performance
# tuning.
#
# Note: Debug switches are on by default.
# -------------------------------------------------------------------------
!IF "$(CPU)" == "i386"
!IF defined(NODEBUG)
ldebug =
!ELSE
!IF defined(PROFILE)
ldebug = -debug:partial -debugtype:coff
!ELSE
!IF defined(TUNE)
ldebug = -debug:partial -debugtype:coff
!ELSE
ldebug = -debug:full -debugtype:both
!ENDIF
!ENDIF
!ENDIF
!ELSE
!IF defined(NODEBUG)
ldebug =
!ELSE
ldebug = -debug:full -debugtype:both
!ENDIF
!ENDIF
# for compatibility with older-style makefiles
linkdebug = $(ldebug)
# -------------------------------------------------------------------------
# Subsystem Dependent Link Flags - must be specified after $(link)
#
# These switches allow for source level debugging with WinDebug for local
# and global variables. They also provide the standard application type and
# entry point declarations.
# -------------------------------------------------------------------------
# for Windows applications that use the C Run-Time libraries
conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
# for POSIX applications
psxlflags = $(lflags) -subsystem:posix -entry:__PosixProcessStartup
# for compatibility with older-style makefiles
conflags = $(conlflags)
guiflags = $(guilflags)
psxflags = $(psxlflags)
# -------------------------------------------------------------------------
# C Run-Time Target Module Dependent Link Libraries
#
# Below is a table which describes which libraries to use depending on the
# target module type, although the table specifically refers to Graphical
# User Interface apps, the exact same dependencies apply to Console apps.
# That is, you could replace all occurrences of 'GUI' with 'CON' in the
# following:
#
# Desired CRT Libraries Desired CRT Libraries
# Library to link Library to link
# for EXE with EXE for DLL with DLL
# ----------------------------------------------------
# LIBC GUILIBS None None *
# LIBC GUILIBS LIBC GUILIBS
# LIBC GUILIBS LIBCMT GUILIBSMT
# LIBCMT GUILIBSMT None None *
# LIBCMT GUILIBSMT LIBC GUILIBS
# LIBCMT GUILIBSMT LIBCMT GUILIBSMT
# CRTDLL GUILIBSDLL None None *
# CRTDLL GUILIBSDLL LIBC GUILIBS
# CRTDLL GUILIBSDLL LIBCMT GUILIBSMT
# CRTDLL GUILIBSDLL CRTDLL GUILIBSDLL *
#
# * - Recommended Configurations.
#
# Note: Any executable which accesses a DLL linked with CRTDLL.LIB must
# also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB.
#
# Note: For POSIX applications, link with $(psxlibs).
#
# -------------------------------------------------------------------------
# optional profiling and tuning libraries
!IF "$(CPU)" == "i386"
!IF defined(PROFILE)
optlibs = cap.lib
!ELSE
!IF defined(TUNE)
optlibs = wst.lib
!ELSE
optlibs =
!ENDIF
!ENDIF
!ELSE
optlibs =
!ENDIF
# basic subsystem specific libraries, less the C Run-Time
baselibs = kernel32.lib $(optlibs)
winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
# for Windows applications that use the C Run-Time libraries
conlibs = libc.lib $(baselibs)
conlibsmt = libcmt.lib $(baselibs)
conlibsdll = CRTDLL.lib $(baselibs)
guilibs = libc.lib $(winlibs)
guilibsmt = libcmt.lib $(winlibs)
guilibsdll = CRTDLL.lib $(winlibs)
# for POSIX applications
psxlibs = libcpsx.lib psxdll.lib psxrtl.lib
srcdir = ..

View File

@@ -0,0 +1,95 @@
# Microsoft Developer Studio Project File - Name="mgrdll" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=mgrdll - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mgrdll.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mgrdll.mak" CFG="mgrdll - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mgrdll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "mgrdll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "mgrdll - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# SUBTRACT CPP /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /dll /map /machine:I386
!ELSEIF "$(CFG)" == "mgrdll - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "mgrdll - Win32 Release"
# Name "mgrdll - Win32 Debug"
# Begin Source File
SOURCE=..\Mgrdll.c
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 5.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "mgrdll"=.\mgrdll.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,205 @@
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
!IF "$(CFG)" == ""
CFG=mgrdll - Win32 Debug
!MESSAGE No configuration specified. Defaulting to mgrdll - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "mgrdll - Win32 Release" && "$(CFG)" != "mgrdll - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mgrdll.mak" CFG="mgrdll - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mgrdll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "mgrdll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "mgrdll - Win32 Debug"
CPP=cl.exe
RSC=rc.exe
MTL=mktyplib.exe
!IF "$(CFG)" == "mgrdll - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release
ALL : "$(OUTDIR)\mgrdll.dll"
CLEAN :
-@erase "$(INTDIR)\Mgrdll.obj"
-@erase "$(OUTDIR)\mgrdll.dll"
-@erase "$(OUTDIR)\mgrdll.exp"
-@erase "$(OUTDIR)\mgrdll.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG"\
/D "_WINDOWS" /Fp"$(INTDIR)/mgrdll.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Release/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mgrdll.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /dll /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /dll\
/incremental:no /pdb:"$(OUTDIR)/mgrdll.pdb" /machine:I386\
/out:"$(OUTDIR)/mgrdll.dll" /implib:"$(OUTDIR)/mgrdll.lib"
LINK32_OBJS= \
"$(INTDIR)\Mgrdll.obj"
"$(OUTDIR)\mgrdll.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "mgrdll - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "mgrdll_0"
# PROP BASE Intermediate_Dir "mgrdll_0"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "mgrdll_0"
# PROP Intermediate_Dir "mgrdll_0"
# PROP Target_Dir ""
OUTDIR=.\mgrdll_0
INTDIR=.\mgrdll_0
ALL : "$(OUTDIR)\mgrdll.dll"
CLEAN :
-@erase "$(INTDIR)\Mgrdll.obj"
-@erase "$(INTDIR)\vc40.idb"
-@erase "$(INTDIR)\vc40.pdb"
-@erase "$(OUTDIR)\mgrdll.dll"
-@erase "$(OUTDIR)\mgrdll.exp"
-@erase "$(OUTDIR)\mgrdll.ilk"
-@erase "$(OUTDIR)\mgrdll.lib"
-@erase "$(OUTDIR)\mgrdll.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /D "WIN32" /D\
"_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)/mgrdll.pch" /YX /Fo"$(INTDIR)/"\
/Fd"$(INTDIR)/" /c
CPP_OBJS=.\mgrdll_0/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /win32
MTL_PROJ=/nologo /D "_DEBUG" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mgrdll.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /dll /debug /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /dll\
/incremental:yes /pdb:"$(OUTDIR)/mgrdll.pdb" /debug /machine:I386\
/out:"$(OUTDIR)/mgrdll.dll" /implib:"$(OUTDIR)/mgrdll.lib"
LINK32_OBJS= \
"$(INTDIR)\Mgrdll.obj"
"$(OUTDIR)\mgrdll.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
################################################################################
# Begin Target
# Name "mgrdll - Win32 Release"
# Name "mgrdll - Win32 Debug"
!IF "$(CFG)" == "mgrdll - Win32 Release"
!ELSEIF "$(CFG)" == "mgrdll - Win32 Debug"
!ENDIF
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\Mgrdll.c
"$(INTDIR)\Mgrdll.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
# End Source File
# End Target
# End Project
################################################################################

Binary file not shown.

View File

@@ -0,0 +1,153 @@
# Microsoft Developer Studio Project File - Name="mgrtest" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=mgrtest - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mgrtest.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mgrtest.mak" CFG="mgrtest - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mgrtest - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "mgrtest - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "mgrtest - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 ..\..\..\lib\I386\wintab32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "mgrtest - Win32 Release"
# Name "mgrtest - Win32 Debug"
# Begin Source File
SOURCE=..\bitbox.c
# End Source File
# Begin Source File
SOURCE=..\btnMap.c
# End Source File
# Begin Source File
SOURCE=..\BtnMask.c
# End Source File
# Begin Source File
SOURCE=..\Csrmask.c
# End Source File
# Begin Source File
SOURCE=..\Infodlg.c
# End Source File
# Begin Source File
SOURCE=..\Mgrdlg.c
# End Source File
# Begin Source File
SOURCE=..\Mgrdlg.dlg
# End Source File
# Begin Source File
SOURCE=..\Mgrdlg.h
# End Source File
# Begin Source File
SOURCE=..\Mgrtest.c
# End Source File
# Begin Source File
SOURCE=..\Mgrtest.h
# End Source File
# Begin Source File
SOURCE=..\Mgrtest.rc
!IF "$(CFG)" == "mgrtest - Win32 Release"
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\MoveMask.c
# End Source File
# Begin Source File
SOURCE=..\Msgpack.h
# End Source File
# Begin Source File
SOURCE=..\tests.c
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,44 @@
Microsoft Developer Studio Workspace File, Format Version 5.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "mgrdll"=.\mgrdll.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name mgrtest
End Project Dependency
}}}
###############################################################################
Project: "mgrtest"=.\mgrtest.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,656 @@
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
!IF "$(CFG)" == ""
CFG=mgrtest - Win32 thunk Debug
!MESSAGE No configuration specified. Defaulting to mgrtest - Win32 thunk\
Debug.
!ENDIF
!IF "$(CFG)" != "mgrtest - Win32 Release" && "$(CFG)" !=\
"mgrtest - Win32 Debug" && "$(CFG)" != "mgrtest - Win32 thunk Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mgrtest.mak" CFG="mgrtest - Win32 thunk Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mgrtest - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "mgrtest - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "mgrtest - Win32 thunk Debug" (based on "Win32 (x86) Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "mgrtest - Win32 Debug"
CPP=cl.exe
RSC=rc.exe
MTL=mktyplib.exe
!IF "$(CFG)" == "mgrtest - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release
ALL : "$(OUTDIR)\mgrtest.exe"
CLEAN :
-@erase "$(INTDIR)\bitbox.obj"
-@erase "$(INTDIR)\btnMap.obj"
-@erase "$(INTDIR)\BtnMask.obj"
-@erase "$(INTDIR)\Csrmask.obj"
-@erase "$(INTDIR)\Infodlg.obj"
-@erase "$(INTDIR)\Mgrdlg.obj"
-@erase "$(INTDIR)\Mgrtest.obj"
-@erase "$(INTDIR)\mgrtest.res"
-@erase "$(INTDIR)\MoveMask.obj"
-@erase "$(INTDIR)\tests.obj"
-@erase "$(OUTDIR)\mgrtest.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG"\
/D "_WINDOWS" /Fp"$(INTDIR)/mgrtest.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Release/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/mgrtest.res" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mgrtest.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows\
/incremental:no /pdb:"$(OUTDIR)/mgrtest.pdb" /machine:I386\
/out:"$(OUTDIR)/mgrtest.exe"
LINK32_OBJS= \
"$(INTDIR)\bitbox.obj" \
"$(INTDIR)\btnMap.obj" \
"$(INTDIR)\BtnMask.obj" \
"$(INTDIR)\Csrmask.obj" \
"$(INTDIR)\Infodlg.obj" \
"$(INTDIR)\Mgrdlg.obj" \
"$(INTDIR)\Mgrtest.obj" \
"$(INTDIR)\mgrtest.res" \
"$(INTDIR)\MoveMask.obj" \
"$(INTDIR)\tests.obj"
"$(OUTDIR)\mgrtest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "mgrtest_"
# PROP BASE Intermediate_Dir "mgrtest_"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "mgrtest_"
# PROP Intermediate_Dir "mgrtest_"
# PROP Target_Dir ""
OUTDIR=.\mgrtest_
INTDIR=.\mgrtest_
ALL : "$(OUTDIR)\mgrtest.exe"
CLEAN :
-@erase "$(INTDIR)\bitbox.obj"
-@erase "$(INTDIR)\btnMap.obj"
-@erase "$(INTDIR)\BtnMask.obj"
-@erase "$(INTDIR)\Csrmask.obj"
-@erase "$(INTDIR)\Infodlg.obj"
-@erase "$(INTDIR)\Mgrdlg.obj"
-@erase "$(INTDIR)\Mgrtest.obj"
-@erase "$(INTDIR)\mgrtest.res"
-@erase "$(INTDIR)\MoveMask.obj"
-@erase "$(INTDIR)\tests.obj"
-@erase "$(INTDIR)\vc40.idb"
-@erase "$(INTDIR)\vc40.pdb"
-@erase "$(OUTDIR)\mgrtest.exe"
-@erase "$(OUTDIR)\mgrtest.ilk"
-@erase "$(OUTDIR)\mgrtest.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /D "WIN32" /D\
"_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)/mgrtest.pch" /YX /Fo"$(INTDIR)/"\
/Fd"$(INTDIR)/" /c
CPP_OBJS=.\mgrtest_/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /win32
MTL_PROJ=/nologo /D "_DEBUG" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/mgrtest.res" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mgrtest.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /debug /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows\
/incremental:yes /pdb:"$(OUTDIR)/mgrtest.pdb" /debug /machine:I386\
/out:"$(OUTDIR)/mgrtest.exe"
LINK32_OBJS= \
"$(INTDIR)\bitbox.obj" \
"$(INTDIR)\btnMap.obj" \
"$(INTDIR)\BtnMask.obj" \
"$(INTDIR)\Csrmask.obj" \
"$(INTDIR)\Infodlg.obj" \
"$(INTDIR)\Mgrdlg.obj" \
"$(INTDIR)\Mgrtest.obj" \
"$(INTDIR)\mgrtest.res" \
"$(INTDIR)\MoveMask.obj" \
"$(INTDIR)\tests.obj"
"$(OUTDIR)\mgrtest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "mgrtest0"
# PROP BASE Intermediate_Dir "mgrtest0"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "mgrtest0"
# PROP Intermediate_Dir "mgrtest0"
# PROP Target_Dir ""
OUTDIR=.\mgrtest0
INTDIR=.\mgrtest0
ALL : "$(OUTDIR)\mgrtest.exe"
CLEAN :
-@erase "$(INTDIR)\bitbox.obj"
-@erase "$(INTDIR)\btnMap.obj"
-@erase "$(INTDIR)\BtnMask.obj"
-@erase "$(INTDIR)\Csrmask.obj"
-@erase "$(INTDIR)\Infodlg.obj"
-@erase "$(INTDIR)\Mgrdlg.obj"
-@erase "$(INTDIR)\Mgrtest.obj"
-@erase "$(INTDIR)\mgrtest.res"
-@erase "$(INTDIR)\MoveMask.obj"
-@erase "$(INTDIR)\tests.obj"
-@erase "$(INTDIR)\vc40.idb"
-@erase "$(INTDIR)\vc40.pdb"
-@erase "$(OUTDIR)\mgrtest.exe"
-@erase "$(OUTDIR)\mgrtest.ilk"
-@erase "$(OUTDIR)\mgrtest.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /D "WIN32" /D\
"_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)/mgrtest.pch" /YX /Fo"$(INTDIR)/"\
/Fd"$(INTDIR)/" /c
CPP_OBJS=.\mgrtest0/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /win32
MTL_PROJ=/nologo /D "_DEBUG" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/mgrtest.res" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mgrtest.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows /debug /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib ..\..\..\lib\I386\wintab32.lib /nologo /subsystem:windows\
/incremental:yes /pdb:"$(OUTDIR)/mgrtest.pdb" /debug /machine:I386\
/out:"$(OUTDIR)/mgrtest.exe"
LINK32_OBJS= \
"$(INTDIR)\bitbox.obj" \
"$(INTDIR)\btnMap.obj" \
"$(INTDIR)\BtnMask.obj" \
"$(INTDIR)\Csrmask.obj" \
"$(INTDIR)\Infodlg.obj" \
"$(INTDIR)\Mgrdlg.obj" \
"$(INTDIR)\Mgrtest.obj" \
"$(INTDIR)\mgrtest.res" \
"$(INTDIR)\MoveMask.obj" \
"$(INTDIR)\tests.obj"
"$(OUTDIR)\mgrtest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
################################################################################
# Begin Target
# Name "mgrtest - Win32 Release"
# Name "mgrtest - Win32 Debug"
# Name "mgrtest - Win32 thunk Debug"
!IF "$(CFG)" == "mgrtest - Win32 Release"
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
!ENDIF
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\tests.c
NODEP_CPP_TESTS=\
"..\wintab.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\tests.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\tests.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\tests.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\btnMap.c
DEP_CPP_BTNMA=\
"..\Mgrtest.h"\
NODEP_CPP_BTNMA=\
"..\wintab.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\btnMap.obj" : $(SOURCE) $(DEP_CPP_BTNMA) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\btnMap.obj" : $(SOURCE) $(DEP_CPP_BTNMA) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\btnMap.obj" : $(SOURCE) $(DEP_CPP_BTNMA) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\BtnMask.c
DEP_CPP_BTNMAS=\
"..\Mgrdlg.h"\
"..\Mgrtest.h"\
NODEP_CPP_BTNMAS=\
"..\wintab.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\BtnMask.obj" : $(SOURCE) $(DEP_CPP_BTNMAS) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\BtnMask.obj" : $(SOURCE) $(DEP_CPP_BTNMAS) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\BtnMask.obj" : $(SOURCE) $(DEP_CPP_BTNMAS) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\Csrmask.c
DEP_CPP_CSRMA=\
"..\Mgrtest.h"\
NODEP_CPP_CSRMA=\
"..\wintab.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\Csrmask.obj" : $(SOURCE) $(DEP_CPP_CSRMA) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\Csrmask.obj" : $(SOURCE) $(DEP_CPP_CSRMA) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\Csrmask.obj" : $(SOURCE) $(DEP_CPP_CSRMA) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\Infodlg.c
DEP_CPP_INFOD=\
"..\Mgrtest.h"\
NODEP_CPP_INFOD=\
"..\wintab.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\Infodlg.obj" : $(SOURCE) $(DEP_CPP_INFOD) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\Infodlg.obj" : $(SOURCE) $(DEP_CPP_INFOD) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\Infodlg.obj" : $(SOURCE) $(DEP_CPP_INFOD) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\Mgrdlg.c
DEP_CPP_MGRDL=\
"..\Mgrdlg.h"\
"..\Msgpack.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\Mgrdlg.obj" : $(SOURCE) $(DEP_CPP_MGRDL) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\Mgrdlg.obj" : $(SOURCE) $(DEP_CPP_MGRDL) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\Mgrdlg.obj" : $(SOURCE) $(DEP_CPP_MGRDL) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\Mgrtest.c
DEP_CPP_MGRTE=\
"..\Mgrdlg.h"\
"..\Mgrtest.h"\
"..\Msgpack.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\Mgrtest.obj" : $(SOURCE) $(DEP_CPP_MGRTE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\Mgrtest.obj" : $(SOURCE) $(DEP_CPP_MGRTE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\Mgrtest.obj" : $(SOURCE) $(DEP_CPP_MGRTE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\mgrtest.rc
DEP_RSC_MGRTES=\
"..\Mgrdlg.h"\
"..\Mgrtest.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\mgrtest.res" : $(SOURCE) $(DEP_RSC_MGRTES) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)/mgrtest.res" /i "\wtkit125\Examples\Mgrtest"\
/d "NDEBUG" $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\mgrtest.res" : $(SOURCE) $(DEP_RSC_MGRTES) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)/mgrtest.res" /i "\wtkit125\Examples\Mgrtest"\
/d "_DEBUG" $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\mgrtest.res" : $(SOURCE) $(DEP_RSC_MGRTES) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)/mgrtest.res" /i "\wtkit125\Examples\Mgrtest"\
/d "_DEBUG" $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\MoveMask.c
DEP_CPP_MOVEM=\
"..\Mgrtest.h"\
NODEP_CPP_MOVEM=\
"..\wintab.h"\
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\MoveMask.obj" : $(SOURCE) $(DEP_CPP_MOVEM) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\MoveMask.obj" : $(SOURCE) $(DEP_CPP_MOVEM) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\MoveMask.obj" : $(SOURCE) $(DEP_CPP_MOVEM) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\wtkit125\Examples\Mgrtest\bitbox.c
!IF "$(CFG)" == "mgrtest - Win32 Release"
"$(INTDIR)\bitbox.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 Debug"
"$(INTDIR)\bitbox.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "mgrtest - Win32 thunk Debug"
"$(INTDIR)\bitbox.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
# End Target
# End Project
################################################################################

Binary file not shown.