--- mstools/samples/ddeml/client/track.c 2018/08/09 18:20:38 1.1 +++ mstools/samples/ddeml/client/track.c 2018/08/09 18:23:22 1.1.1.3 @@ -1,3 +1,14 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + /*************************************************************************** * * * MODULE : track.c * @@ -6,7 +17,6 @@ * * ***************************************************************************/ #include -#include #include "track.h" RECT rcTrack; @@ -25,11 +35,6 @@ VOID VertUpdate(HDC hdc, INT xOld, INT x INT y2New); LONG APIENTRY TrackingWndProc(HWND hwnd, DWORD msg, WPARAM wParam, LPARAM lParam); -typedef POINTS MPOINT ; -#define MAKEMPOINT(l) (*((MPOINT *)&(l))) -#define MPOINT2POINT(mpt,pt) ((pt).x = (mpt).x, (pt).y = (mpt).y) - - /**************************************************************************** * * * FUNCTION : TrackRect() * @@ -106,7 +111,7 @@ LPRECT prcResult) // result rect in bo bottom - ptOrg.y); DrawTrackRect(hwnd, &rcTrack, NULL); - while (GetMessage(&msg, NULL, NULL, NULL)) + while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); DrawTrackRect(hwnd, &rcTrack, NULL); @@ -144,13 +149,13 @@ LPRECT prcNew) hdc = GetDC(hwnd); SetROP2(hdc, R2_NOT); // erase/draw the whole thing - MoveToEx(hdc, prcOld->left, prcOld->top, NULL); + MoveToEx(hdc, prcOld->left, prcOld->top, NULL); LineTo(hdc, prcOld->right, prcOld->top); LineTo(hdc, prcOld->right, prcOld->bottom); LineTo(hdc, prcOld->left, prcOld->bottom); LineTo(hdc, prcOld->left, prcOld->top); if (prcNew) { - MoveToEx(hdc, prcNew->left, prcNew->top, NULL); + MoveToEx(hdc, prcNew->left, prcNew->top, NULL); LineTo(hdc, prcNew->right, prcNew->top); LineTo(hdc, prcNew->right, prcNew->bottom); LineTo(hdc, prcNew->left, prcNew->bottom); @@ -227,7 +232,7 @@ LPARAM lParam) DrawTrackRect(hwnd, &rcTrack, &rcNow); CopyRect(&rcTrack, &rcNow); - MPOINT2POINT(MAKEMPOINT(lParam), ptPrev); + ((ptPrev).x = ((*((POINTS *)&(lParam)))).x, (ptPrev).y = ((*((POINTS *)&(lParam)))).y); } break; @@ -245,4 +250,3 @@ LPARAM lParam) } -