initial
This commit is contained in:
439
public/wintab/examples/cadtest/cadtest.c
Normal file
439
public/wintab/examples/cadtest/cadtest.c
Normal file
@@ -0,0 +1,439 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
CadTest - example of how a cad program might use WinTab.
|
||||
RICO 4/1/92
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include "msgpack.h"
|
||||
#include <commdlg.h>
|
||||
#include <wintab.h>
|
||||
#define PACKETDATA (PK_X | PK_Y | PK_BUTTONS)
|
||||
#define PACKETMODE PK_BUTTONS
|
||||
#include <pktdef.h>
|
||||
#include "cadtest.h"
|
||||
#ifdef USE_X_LIB
|
||||
#include <wintabx.h>
|
||||
#endif
|
||||
|
||||
HANDLE hInst;
|
||||
|
||||
#ifdef WIN32
|
||||
#define GetID() GetCurrentProcessId()
|
||||
#else
|
||||
#define GetID() hInst
|
||||
#endif
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
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);
|
||||
}
|
||||
|
||||
#ifdef USE_X_LIB
|
||||
_UnlinkWintab();
|
||||
#endif
|
||||
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)(COLOR_APPWORKSPACE + 1);
|
||||
wc.lpszMenuName = "CadTestMenu";
|
||||
wc.lpszClassName = "CadTestWClass";
|
||||
|
||||
/* Register the window class and return success/failure code. */
|
||||
|
||||
return (RegisterClass(&wc));
|
||||
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
BOOL InitInstance(hInstance, nCmdShow)
|
||||
HANDLE hInstance;
|
||||
int nCmdShow;
|
||||
{
|
||||
HWND hWnd;
|
||||
char buf[50];
|
||||
|
||||
/* 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. */
|
||||
|
||||
wsprintf(buf, "CadTest:%x", GetID());
|
||||
hWnd = CreateWindow(
|
||||
"CadTestWClass",
|
||||
buf,
|
||||
WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL
|
||||
);
|
||||
|
||||
/* If window could not be created, return "failure" */
|
||||
|
||||
if (!hWnd)
|
||||
return (FALSE);
|
||||
|
||||
/* Make the window visible; update its client area; and return "success" */
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
return (TRUE);
|
||||
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* open and save file data. */
|
||||
char szFile[256] = "cadtest.ctx";
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* enforces context rules even if we didn't save the context. */
|
||||
void static NEAR TabletSetup(PLOGCONTEXT pLc)
|
||||
{
|
||||
/* modify the digitizing region */
|
||||
wsprintf(pLc->lcName, "CadTest Digitizing %x", GetID());
|
||||
pLc->lcOptions |= CXO_MESSAGES;
|
||||
pLc->lcMsgBase = WT_DEFBASE;
|
||||
pLc->lcPktData = PACKETDATA;
|
||||
pLc->lcPktMode = PACKETMODE;
|
||||
pLc->lcMoveMask = PACKETDATA;
|
||||
pLc->lcBtnUpMask = pLc->lcBtnDnMask;
|
||||
|
||||
/* output in 10000 x 10000 grid */
|
||||
pLc->lcOutOrgX = pLc->lcOutOrgY = 0;
|
||||
pLc->lcOutExtX = 10000;
|
||||
pLc->lcOutExtY = 10000;
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
HCTX static TabletRestore(HCTX hCtx, HWND hWnd)
|
||||
{
|
||||
void *save_buf;
|
||||
UINT save_size;
|
||||
HFILE hFile;
|
||||
OFSTRUCT ofs;
|
||||
LOGCONTEXT lc;
|
||||
|
||||
/* alloc a save buffer. */
|
||||
WTInfo(WTI_INTERFACE, IFC_CTXSAVESIZE, &save_size);
|
||||
if (save_buf = (void *)LocalAlloc(LPTR, save_size))
|
||||
{
|
||||
OPENFILENAME ofn;
|
||||
|
||||
/* do open file box. */
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hWnd;
|
||||
ofn.lpstrFilter = "Context Files\0*.ctx\0";
|
||||
ofn.lpstrFile = szFile;
|
||||
ofn.nMaxFile = sizeof(szFile);
|
||||
ofn.Flags = OFN_FILEMUSTEXIST |OFN_PATHMUSTEXIST;
|
||||
ofn.lpstrDefExt = "ctx";
|
||||
|
||||
if (GetOpenFileName(&ofn)) {
|
||||
|
||||
/* open the file. */
|
||||
if ((hFile = OpenFile(szFile, &ofs, OF_READ)) != HFILE_ERROR)
|
||||
{
|
||||
/* read in the data. */
|
||||
_lread(hFile, save_buf, save_size);
|
||||
|
||||
/* close the file. */
|
||||
_lclose(hFile);
|
||||
}
|
||||
|
||||
/* restore the context, disabled. */
|
||||
if (hCtx)
|
||||
WTClose(hCtx);
|
||||
hCtx = WTRestore(hWnd, save_buf, FALSE);
|
||||
/* re-init the context. */
|
||||
if (hCtx) {
|
||||
WTGet(hCtx, &lc);
|
||||
TabletSetup(&lc);
|
||||
WTSet(hCtx, &lc);
|
||||
|
||||
/* open for real. */
|
||||
WTEnable(hCtx, TRUE);
|
||||
}
|
||||
}
|
||||
/* bag the save buffer. */
|
||||
LocalFree((HLOCAL)save_buf);
|
||||
}
|
||||
return hCtx;
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
void TabletSave(HCTX hCtx, HWND hWnd, BOOL fAs)
|
||||
{
|
||||
|
||||
void *save_buf;
|
||||
UINT save_size;
|
||||
HFILE hFile;
|
||||
OFSTRUCT ofs;
|
||||
|
||||
/* alloc a save buffer. */
|
||||
WTInfo(WTI_INTERFACE, IFC_CTXSAVESIZE, &save_size);
|
||||
if (save_buf = (void *)LocalAlloc(LPTR, save_size))
|
||||
{
|
||||
/* save the data. */
|
||||
if (WTSave(hCtx, save_buf)) {
|
||||
|
||||
/* if setting file name... */
|
||||
if (fAs) {
|
||||
OPENFILENAME ofn;
|
||||
|
||||
/* do save file box. */
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hWnd;
|
||||
ofn.lpstrFilter = "Context Files\0*.ctx\0";
|
||||
ofn.lpstrFile = szFile;
|
||||
ofn.nMaxFile = sizeof(szFile);
|
||||
ofn.Flags = OFN_PATHMUSTEXIST;
|
||||
ofn.lpstrDefExt = "ctx";
|
||||
|
||||
fAs = GetSaveFileName(&ofn);
|
||||
}
|
||||
else
|
||||
/* assume file name good. */
|
||||
fAs = TRUE;
|
||||
|
||||
/* if good file name... */
|
||||
if (fAs) {
|
||||
/* open the file. */
|
||||
if ((hFile = OpenFile(szFile, &ofs, OF_WRITE | OF_CREATE)) !=
|
||||
HFILE_ERROR)
|
||||
{
|
||||
/* read in the data. */
|
||||
_lwrite(hFile, save_buf, save_size);
|
||||
|
||||
/* close the file. */
|
||||
_lclose(hFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* bag the save buffer. */
|
||||
LocalFree((HLOCAL)save_buf);
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
HCTX static NEAR TabletInit(HWND hWnd)
|
||||
{
|
||||
LOGCONTEXT lcMine;
|
||||
|
||||
/* get default region */
|
||||
WTInfo(WTI_DEFCONTEXT, 0, &lcMine);
|
||||
|
||||
/* init the data structure */
|
||||
TabletSetup(&lcMine);
|
||||
|
||||
/* open the region */
|
||||
return WTOpen(hWnd, &lcMine, TRUE);
|
||||
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
LRESULT FAR PASCAL MainWndProc(hWnd, message, wParam, lParam)
|
||||
HWND hWnd;
|
||||
unsigned message;
|
||||
WPARAM wParam;
|
||||
LPARAM lParam;
|
||||
{
|
||||
FARPROC lpProcAbout;
|
||||
static HCTX hTab = NULL;
|
||||
static POINT ptOld, ptNew;
|
||||
static RECT rcClient;
|
||||
PAINTSTRUCT psPaint;
|
||||
HDC hDC;
|
||||
PACKET pkt;
|
||||
BOOL fHandled = TRUE;
|
||||
LRESULT lResult = 0L;
|
||||
static int count;
|
||||
static BOOL fPersist;
|
||||
|
||||
|
||||
switch (message) {
|
||||
|
||||
case WM_CREATE:
|
||||
hTab = TabletInit(hWnd);
|
||||
if (!hTab) {
|
||||
MessageBox(NULL, " Could Not Open Tablet Context.", "WinTab",
|
||||
MB_OK | MB_ICONHAND);
|
||||
|
||||
SendMessage(hWnd, WM_DESTROY, 0, 0L);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
GetClientRect(hWnd, &rcClient);
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (GET_WM_COMMAND_ID(wParam, lParam)) {
|
||||
case IDM_ABOUT:
|
||||
lpProcAbout = MakeProcInstance(About, hInst);
|
||||
DialogBox(hInst, "AboutBox", hWnd, lpProcAbout);
|
||||
FreeProcInstance(lpProcAbout);
|
||||
break;
|
||||
|
||||
case IDM_OPEN:
|
||||
hTab = TabletRestore(hTab, hWnd);
|
||||
break;
|
||||
|
||||
case IDM_SAVE:
|
||||
TabletSave(hTab, hWnd, FALSE);
|
||||
break;
|
||||
|
||||
case IDM_SAVE_AS:
|
||||
TabletSave(hTab, hWnd, TRUE);
|
||||
break;
|
||||
|
||||
case IDM_CONFIG:
|
||||
WTConfig(hTab, hWnd);
|
||||
break;
|
||||
|
||||
case IDM_PERSIST:
|
||||
fPersist = !fPersist;
|
||||
CheckMenuItem(GetSubMenu(GetMenu(hWnd), IDM_EDIT),
|
||||
IDM_PERSIST, (fPersist ? MF_CHECKED : MF_UNCHECKED));
|
||||
break;
|
||||
|
||||
default:
|
||||
fHandled = FALSE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WT_PACKET:
|
||||
if (WTPacket((HCTX)lParam, wParam, &pkt)) {
|
||||
if (HIWORD(pkt.pkButtons)==TBN_DOWN) {
|
||||
MessageBeep(0);
|
||||
}
|
||||
ptOld = ptNew;
|
||||
ptNew.x = MulDiv((UINT)pkt.pkX, rcClient.right, 10000);
|
||||
ptNew.y = MulDiv((UINT)pkt.pkY, rcClient.bottom, 10000);
|
||||
if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) {
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
if (count++ == 4) {
|
||||
count = 0;
|
||||
UpdateWindow(hWnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
if (GET_WM_ACTIVATE_STATE(wParam, lParam))
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
|
||||
/* if switching in the middle, disable the region */
|
||||
if (hTab) {
|
||||
if (!fPersist)
|
||||
WTEnable(hTab, GET_WM_ACTIVATE_STATE(wParam, lParam));
|
||||
if (hTab && GET_WM_ACTIVATE_STATE(wParam, lParam))
|
||||
WTOverlap(hTab, TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
if (hTab)
|
||||
WTClose(hTab);
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
count = 0;
|
||||
hDC = BeginPaint(hWnd, &psPaint);
|
||||
|
||||
/* redo horz */
|
||||
PatBlt(hDC, rcClient.left, rcClient.bottom - ptNew.y,
|
||||
rcClient.right, 1, BLACKNESS);
|
||||
/* redo vert */
|
||||
PatBlt(hDC, ptNew.x, rcClient.top,
|
||||
1, rcClient.bottom, BLACKNESS);
|
||||
|
||||
EndPaint(hWnd, &psPaint);
|
||||
break;
|
||||
|
||||
default:
|
||||
fHandled = FALSE;
|
||||
break;
|
||||
}
|
||||
if (fHandled)
|
||||
return (lResult);
|
||||
else
|
||||
return (DefWindowProc(hWnd, message, wParam, lParam));
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
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);
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
17
public/wintab/examples/cadtest/cadtest.h
Normal file
17
public/wintab/examples/cadtest/cadtest.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#define IDM_FILE 0
|
||||
#define IDM_EDIT 1
|
||||
#define IDM_HELP 2
|
||||
|
||||
#define IDM_ABOUT 100
|
||||
#define IDM_OPEN 101
|
||||
#define IDM_SAVE 102
|
||||
#define IDM_SAVE_AS 103
|
||||
#define IDM_CONFIG 104
|
||||
#define IDM_PERSIST 105
|
||||
|
||||
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);
|
||||
|
||||
32
public/wintab/examples/cadtest/cadtest.rc
Normal file
32
public/wintab/examples/cadtest/cadtest.rc
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "windows.h"
|
||||
#include "cadtest.h"
|
||||
|
||||
CadtestMenu MENU
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
BEGIN
|
||||
MENUITEM "&Open...", IDM_OPEN
|
||||
MENUITEM "&Save", IDM_SAVE
|
||||
MENUITEM "Save &As...", IDM_SAVE_AS
|
||||
END
|
||||
POPUP "&Edit"
|
||||
BEGIN
|
||||
MENUITEM "&Configure Tablet Context...", IDM_CONFIG
|
||||
MENUITEM "&Persistent Context", IDM_PERSIST
|
||||
END
|
||||
POPUP "&Help"
|
||||
BEGIN
|
||||
MENUITEM "&About Cadtest...", IDM_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
AboutBox DIALOG 22, 17, 144, 75
|
||||
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About Cadtest"
|
||||
BEGIN
|
||||
CTEXT "LCS/Telegraphics" -1, 0, 5, 144, 8
|
||||
CTEXT "Cadtest Application" -1, 0, 14, 144, 8
|
||||
CTEXT "Version 0.0" -1, 0, 34, 144, 8
|
||||
DEFPUSHBUTTON "OK" IDOK, 53, 59, 32, 14, WS_GROUP
|
||||
END
|
||||
|
||||
23
public/wintab/examples/cadtest/msgpack.h
Normal file
23
public/wintab/examples/cadtest/msgpack.h
Normal 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
|
||||
|
||||
29
public/wintab/examples/cadtest/win16/cadtest.def
Normal file
29
public/wintab/examples/cadtest/win16/cadtest.def
Normal file
@@ -0,0 +1,29 @@
|
||||
; module-definition file for cadtest -- used by LINK.EXE
|
||||
|
||||
NAME CADTEST ; 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
|
||||
|
||||
17
public/wintab/examples/cadtest/win16/doswin16.mak
Normal file
17
public/wintab/examples/cadtest/win16/doswin16.mak
Normal 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)
|
||||
linkdebug =
|
||||
link = link $(linkdebug)
|
||||
guiflags = /NOE /NOD /CO /align:16
|
||||
guilibs = libw $(model)libcew ver commdlg
|
||||
guilibsdll = libw $(model)dllcew ver commdlg
|
||||
|
||||
57
public/wintab/examples/cadtest/win16/makefile
Normal file
57
public/wintab/examples/cadtest/win16/makefile
Normal file
@@ -0,0 +1,57 @@
|
||||
!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 = CADTEST
|
||||
|
||||
all: $(proj).exe
|
||||
|
||||
# force a complete rebuild from source.
|
||||
cleanall: clean
|
||||
-del *.exe
|
||||
|
||||
#clean up everything but the .EXEs.
|
||||
clean:
|
||||
-del *.res
|
||||
-del *.?bj
|
||||
-del *.map
|
||||
|
||||
# Update the resource if necessary
|
||||
$(proj).res: $(srcdir)\$(proj).rc $(srcdir)\$(proj).h
|
||||
$(rc) $(cinclude) $(rcvars) -r -fo $(proj).res $(cvars) $(srcdir)\$(proj).rc
|
||||
!IF defined(CPUTYPE)
|
||||
cvtres -$(CPU) $(proj).res -o $(proj).rbj
|
||||
!ENDIF
|
||||
|
||||
|
||||
# Update the object file if necessary
|
||||
$(proj).obj: $(srcdir)\$(proj).c $(srcdir)\$(proj).h
|
||||
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\$(proj).c
|
||||
|
||||
# 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:
|
||||
|
||||
$(proj).exe: $(proj).obj $(proj).res $(proj).def
|
||||
!if defined(CPU)
|
||||
# This is for Windows NT:
|
||||
$(link) $(linkdebug) $(guiflags) $(proj).obj $(WINTAB)\lib\$(CPU)\wintab32.lib $(guilibs) VERSION.LIB -out:$(proj).exe
|
||||
!ELSE
|
||||
# This is for Windows DOS:
|
||||
$(link) $(guiflags) $(proj).obj ,,, $(WINTAB)\lib\wintab.lib $(guilibs) , $(proj).DEF
|
||||
rc $(proj).res
|
||||
!ENDIF
|
||||
414
public/wintab/examples/cadtest/win16/ntwin32.mak
Normal file
414
public/wintab/examples/cadtest/win16/ntwin32.mak
Normal 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 = -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 = ..
|
||||
29
public/wintab/examples/cadtest/win16x/cadtest.def
Normal file
29
public/wintab/examples/cadtest/win16x/cadtest.def
Normal file
@@ -0,0 +1,29 @@
|
||||
; module-definition file for cadtest -- used by LINK.EXE
|
||||
|
||||
NAME CADTEST ; 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
|
||||
|
||||
53
public/wintab/examples/cadtest/win16x/cadtest.map
Normal file
53
public/wintab/examples/cadtest/win16x/cadtest.map
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
CADTEST
|
||||
|
||||
Start Length Name Class
|
||||
0001:0000 01320H _TEXT CODE
|
||||
0002:0000 00010H NULL BEGDATA
|
||||
0002:0010 002A2H _DATA DATA
|
||||
0002:02B2 0000EH CDATA DATA
|
||||
0002:02C0 00000H XIFB DATA
|
||||
0002:02C0 00000H XIF DATA
|
||||
0002:02C0 00000H XIFE DATA
|
||||
0002:02C0 00000H XIB DATA
|
||||
0002:02C0 00000H XI DATA
|
||||
0002:02C0 00000H XIE DATA
|
||||
0002:02C0 00000H XPB DATA
|
||||
0002:02C0 00000H XP DATA
|
||||
0002:02C0 00000H XPE DATA
|
||||
0002:02C0 00000H XCB DATA
|
||||
0002:02C0 00000H XC DATA
|
||||
0002:02C0 00000H XCE DATA
|
||||
0002:02C0 00000H XCFB DATA
|
||||
0002:02C0 00000H XCFCRT DATA
|
||||
0002:02C0 00000H XCF DATA
|
||||
0002:02C0 00000H XCFE DATA
|
||||
0002:02C0 00000H XIFCB DATA
|
||||
0002:02C0 00000H XIFU DATA
|
||||
0002:02C0 00000H XIFL DATA
|
||||
0002:02C0 00000H XIFM DATA
|
||||
0002:02C0 00000H XIFCE DATA
|
||||
0002:02C0 00000H DBDATA DATA
|
||||
0002:02C0 00000H CONST CONST
|
||||
0002:02C0 00008H HDR MSG
|
||||
0002:02C8 00146H MSG MSG
|
||||
0002:040E 00002H PAD MSG
|
||||
0002:0410 00001H EPAD MSG
|
||||
0002:0412 00014H _BSS BSS
|
||||
0002:0426 00000H XOB BSS
|
||||
0002:0426 00000H XO BSS
|
||||
0002:0426 00000H XOE BSS
|
||||
0002:0426 00000H XOFB BSS
|
||||
0002:0426 00000H XOF BSS
|
||||
0002:0426 00000H XOFE BSS
|
||||
0002:0430 00002H c_common BSS
|
||||
|
||||
Origin Group
|
||||
0002:0 DGROUP
|
||||
|
||||
Address Export Alias
|
||||
|
||||
0001:095A About About
|
||||
0001:0588 MainWndProc MainWndProc
|
||||
|
||||
Program entry point at 0001:0baa
|
||||
17
public/wintab/examples/cadtest/win16x/doswin16.mak
Normal file
17
public/wintab/examples/cadtest/win16x/doswin16.mak
Normal 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) -DUSE_X_LIB
|
||||
cvars = -D$(ENV)
|
||||
linkdebug =
|
||||
link = link $(linkdebug)
|
||||
guiflags = /NOE /NOD /CO /align:16
|
||||
guilibs = libw $(model)libcew ver commdlg
|
||||
guilibsdll = libw $(model)dllcew ver commdlg
|
||||
|
||||
58
public/wintab/examples/cadtest/win16x/makefile
Normal file
58
public/wintab/examples/cadtest/win16x/makefile
Normal file
@@ -0,0 +1,58 @@
|
||||
!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 = CADTEST
|
||||
|
||||
all: $(proj).exe
|
||||
|
||||
# force a complete rebuild from source.
|
||||
cleanall: clean
|
||||
-del *.exe
|
||||
|
||||
#clean up everything but the .EXEs.
|
||||
clean:
|
||||
-del *.res
|
||||
-del *.?bj
|
||||
-del *.map
|
||||
|
||||
# Update the resource if necessary
|
||||
$(proj).res: $(srcdir)\$(proj).rc $(srcdir)\$(proj).h
|
||||
$(rc) $(cinclude) $(rcvars) -r -fo $(proj).res $(cvars) $(srcdir)\$(proj).rc
|
||||
!IF defined(CPU)
|
||||
cvtres -$(CPU) $(proj).res -o $(proj).rbj
|
||||
!ENDIF
|
||||
|
||||
|
||||
# Update the object file if necessary
|
||||
$(proj).obj: $(srcdir)\$(proj).c $(srcdir)\$(proj).h
|
||||
$(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\$(proj).c
|
||||
|
||||
# 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:
|
||||
|
||||
$(proj).exe: $(proj).obj $(proj).res $(proj).def
|
||||
!if defined(CPU)
|
||||
# This is for Windows NT:
|
||||
$(link) $(linkdebug) $(guiflags) $(proj).obj $(WINTAB)\lib\$(CPU)\wntab32x.lib $(guilibs) VERSION.LIB $(proj).rbj -out:$(proj).exe
|
||||
!ENDIF
|
||||
!if !defined(CPU)
|
||||
# This is for Windows DOS:
|
||||
$(link) $(guiflags) $(proj).obj ,,, $(WINTAB)\lib\wintabx.lib $(guilibs) , $(proj).DEF
|
||||
rc $(proj).res
|
||||
!ENDIF
|
||||
414
public/wintab/examples/cadtest/win16x/ntwin32.mak
Normal file
414
public/wintab/examples/cadtest/win16x/ntwin32.mak
Normal 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 = -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 = ..
|
||||
106
public/wintab/examples/cadtest/win32/cadtest.dsp
Normal file
106
public/wintab/examples/cadtest/win32/cadtest.dsp
Normal file
@@ -0,0 +1,106 @@
|
||||
# Microsoft Developer Studio Project File - Name="cadtest" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=cadtest - 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 "cadtest.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 "cadtest.mak" CFG="cadtest - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "cadtest - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "cadtest - 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)" == "cadtest - 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 /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)" == "cadtest - 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" /FR /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 ..\..\..\lib\I386\wintab32.lib ..\..\..\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 /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "cadtest - Win32 Release"
|
||||
# Name "cadtest - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Cadtest.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Cadtest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Cadtest.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Msgpack.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
29
public/wintab/examples/cadtest/win32/cadtest.dsw
Normal file
29
public/wintab/examples/cadtest/win32/cadtest.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "cadtest"=.\cadtest.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
239
public/wintab/examples/cadtest/win32/cadtest.mak
Normal file
239
public/wintab/examples/cadtest/win32/cadtest.mak
Normal file
@@ -0,0 +1,239 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=cadtest - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to cadtest - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "cadtest - Win32 Release" && "$(CFG)" !=\
|
||||
"cadtest - 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 "cadtest.mak" CFG="cadtest - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "cadtest - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "cadtest - Win32 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 "cadtest - Win32 Debug"
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
MTL=mktyplib.exe
|
||||
|
||||
!IF "$(CFG)" == "cadtest - 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)\cadtest.exe"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Cadtest.obj"
|
||||
-@erase "$(INTDIR)\Cadtest.res"
|
||||
-@erase "$(OUTDIR)\cadtest.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)/cadtest.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)/Cadtest.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/cadtest.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)/cadtest.pdb" /machine:I386\
|
||||
/out:"$(OUTDIR)/cadtest.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\Cadtest.obj" \
|
||||
"$(INTDIR)\Cadtest.res"
|
||||
|
||||
"$(OUTDIR)\cadtest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "cadtest - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "cadtest_"
|
||||
# PROP BASE Intermediate_Dir "cadtest_"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "cadtest_"
|
||||
# PROP Intermediate_Dir "cadtest_"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\cadtest_
|
||||
INTDIR=.\cadtest_
|
||||
|
||||
ALL : "$(OUTDIR)\cadtest.exe"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Cadtest.obj"
|
||||
-@erase "$(INTDIR)\Cadtest.res"
|
||||
-@erase "$(INTDIR)\vc40.idb"
|
||||
-@erase "$(INTDIR)\vc40.pdb"
|
||||
-@erase "$(OUTDIR)\cadtest.exe"
|
||||
-@erase "$(OUTDIR)\cadtest.ilk"
|
||||
-@erase "$(OUTDIR)\cadtest.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)/cadtest.pch" /YX /Fo"$(INTDIR)/"\
|
||||
/Fd"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\cadtest_/
|
||||
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)/Cadtest.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/cadtest.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)/cadtest.pdb" /debug /machine:I386\
|
||||
/out:"$(OUTDIR)/cadtest.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\Cadtest.obj" \
|
||||
"$(INTDIR)\Cadtest.res"
|
||||
|
||||
"$(OUTDIR)\cadtest.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 "cadtest - Win32 Release"
|
||||
# Name "cadtest - Win32 Debug"
|
||||
|
||||
!IF "$(CFG)" == "cadtest - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "cadtest - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\wtkit125\Examples\Cadtest\Cadtest.c
|
||||
DEP_CPP_CADTE=\
|
||||
"..\Cadtest.h"\
|
||||
"..\Msgpack.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\Cadtest.obj" : $(SOURCE) $(DEP_CPP_CADTE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\wtkit125\Examples\Cadtest\Cadtest.rc
|
||||
DEP_RSC_CADTES=\
|
||||
"..\Cadtest.h"\
|
||||
|
||||
|
||||
!IF "$(CFG)" == "cadtest - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\Cadtest.res" : $(SOURCE) $(DEP_RSC_CADTES) "$(INTDIR)"
|
||||
$(RSC) /l 0x409 /fo"$(INTDIR)/Cadtest.res" /i "\wtkit125\Examples\Cadtest"\
|
||||
/d "NDEBUG" $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "cadtest - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\Cadtest.res" : $(SOURCE) $(DEP_RSC_CADTES) "$(INTDIR)"
|
||||
$(RSC) /l 0x409 /fo"$(INTDIR)/Cadtest.res" /i "\wtkit125\Examples\Cadtest"\
|
||||
/d "_DEBUG" $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
################################################################################
|
||||
BIN
public/wintab/examples/cadtest/win32/cadtest.mdp
Normal file
BIN
public/wintab/examples/cadtest/win32/cadtest.mdp
Normal file
Binary file not shown.
Reference in New Issue
Block a user