Annotation of mstools/samples/wxform/wxform.h, revision 1.1.1.3

1.1.1.3 ! root        1: 
        !             2: /******************************************************************************\
        !             3: *       This is a part of the Microsoft Source Code Samples. 
        !             4: *       Copyright (C) 1993 Microsoft Corporation.
        !             5: *       All rights reserved. 
        !             6: *       This source code is only intended as a supplement to 
        !             7: *       Microsoft Development Tools and/or WinHelp documentation.
        !             8: *       See these sources for detailed information regarding the 
        !             9: *       Microsoft samples programs.
        !            10: \******************************************************************************/
        !            11: 
1.1       root       12: /*  wxform.h -- header file for World transform sample.  */
                     13: 
                     14: 
1.1.1.2   root       15: LRESULT CALLBACK MainWndProc     (HWND, UINT, WPARAM, LPARAM);
                     16: LRESULT CALLBACK TransformDlgProc(HWND, UINT, WPARAM, LPARAM);
                     17: LRESULT CALLBACK MouseDlgProc    (HWND, UINT, WPARAM, LPARAM);
1.1       root       18: 
                     19: 
                     20: 
                     21: /* dialog id's for the Transform dialog */
                     22: #define IDD_EM11        101
                     23: #define IDD_EM12        102
                     24: #define IDD_EDX         103
                     25: #define IDD_EM21        104
                     26: #define IDD_EM22        105
                     27: #define IDD_EDY         106
                     28: #define IDD_13          107
                     29: #define IDD_23          108
                     30: #define IDD_33          109
                     31: #define IDD_SETXFORM    110
                     32: #define IDD_IDENTITY    111
                     33: 
                     34: 
                     35: /* dialog id's for the Mouse dialog */
                     36: #define IDD_SCREENX     201
                     37: #define IDD_SCREENY     202
                     38: #define IDD_DEVICEX     203
                     39: #define IDD_DEVICEY     204
                     40: #define IDD_WORLDX      205
                     41: #define IDD_WORLDY      206
                     42: 
                     43: 
                     44: /* special messages for doTrackobject(). */
                     45: #define TROB_NEW         WM_USER+1
                     46: #define TROB_DELETE      WM_USER+2
                     47: #define TROB_PAINT       WM_USER+3
                     48: #define TROB_HITTEST     WM_USER+5
                     49: #define TROB_CENTER      WM_USER+6
                     50: #define TROB_SETXFORM    WM_USER+7
                     51: 
                     52: /* special user message for two of the dialogs */
                     53: #define WM_PUTUPFLOATS  WM_USER+1
                     54: 
                     55: 
                     56: /* Different "Track modes." */
                     57: #define TMNONE    0x0000
                     58: #define TMMOVE    0x0001
                     59: #define TMSIZEX   0x0002
                     60: #define TMSIZEY   0x0004
                     61: #define TMSIZEXY  0x0006
                     62: #define TMSHEARX  0x0010
                     63: #define TMSHEARY  0x0020
                     64: #define TMROTATE  0x0008
                     65: 
                     66: 
                     67: /* misc. defines for drawing and formating */
                     68: #define TICKSPACE 20
                     69: #define MAXCHARS  32
                     70: #define INC   5
                     71: #define FORMATFLOAT    "%1.2f"
                     72: #define GRIDCOLOR (COLORREF) 0x01000006
                     73: 
                     74: 
                     75: 
                     76: /* structure for the track object.  c.f. ptoRect */
                     77: typedef struct tagTrackObject{
                     78:     RECT   rect;
                     79:     XFORM  xfmChange;   /* World coordinate transform      */
                     80:     XFORM  xfmDown;     /* transform when the mouse down happens. */
                     81:     HDC    hdc;
                     82:     int    Mode;        /* TMROTATE, TMSIZEXY, TMMOVE, ... */
                     83:     struct tagTrackObject* Next;
                     84: } TrackObject, *PTrackObject;
                     85: 
                     86: 
                     87: /* function prototypes. */
                     88: PTrackObject doTrackObject(PTrackObject, int, HWND, LONG);
                     89: VOID MouseMove(PTrackObject, int, HWND, LONG);
                     90: VOID CenterOrigin (HWND, HDC);
                     91: 
                     92: 
                     93: /* Global variables. */
                     94: BOOL showTransform, showMouse, showHelp;
                     95: HWND hwndTransform, hwndMouse, hwndHelp;
                     96: PTrackObject ptoRect = NULL;
                     97: HANDLE hInst;
                     98: HWND   hwndMain;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.