From 47b9c5f88c28f80ccc881f20d283c88a90577764 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Sat, 1 Dec 2007 18:18:41 +0000 Subject: [PATCH] dummy message --- synctracker2.cpp | 6 ++---- trackview.cpp | 12 +++++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/synctracker2.cpp b/synctracker2.cpp index 6638ef7..33bee6d 100644 --- a/synctracker2.cpp +++ b/synctracker2.cpp @@ -14,15 +14,13 @@ LRESULT CALLBACK mainWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara switch(msg) { case WM_CREATE: - { trackViewWin = createTrackViewWindow(GetModuleHandle(NULL), hwnd); - } break; case WM_SIZE: { - int width = (short)LOWORD(lParam); - int height = (short)HIWORD(lParam); + int width = LOWORD(lParam); + int height = HIWORD(lParam); MoveWindow(trackViewWin, 0, 0, width, height, TRUE); } break; diff --git a/trackview.cpp b/trackview.cpp index 50ae435..e4eaf82 100644 --- a/trackview.cpp +++ b/trackview.cpp @@ -60,7 +60,6 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks) topLeftCorner.left = 0; topLeftCorner.right = leftMarginWidth; FillRect(hdc, &topLeftCorner, (HBRUSH)GetStockObject(GRAY_BRUSH)); -// DrawEdge(hdc, &topLeftCorner, BDR_SUNKENINNER | BDR_RAISEDOUTER, BF_RIGHT | BF_BOTTOM); ExcludeClipRect(hdc, topLeftCorner.left, topLeftCorner.top, topLeftCorner.right, topLeftCorner.bottom); SetBkMode(hdc, TRANSPARENT); @@ -106,13 +105,14 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks) topMargin.left = trackLeft; topMargin.right = trackLeft + trackWidth; - DrawEdge(hdc, &topMargin, BDR_RAISEDINNER | BDR_RAISEDOUTER, BF_ADJUST | BF_LEFT | BF_RIGHT | BF_BOTTOM); - FillRect(hdc, &topMargin, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); + RECT fillRect = topMargin; + DrawEdge(hdc, &fillRect, BDR_RAISEDINNER | BDR_RAISEDOUTER, BF_ADJUST | BF_LEFT | BF_RIGHT | BF_BOTTOM); + FillRect(hdc, &fillRect, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); /* format the text */ _snprintf_s(temp, 256, "track %d", x); TextOut(hdc, - topMargin.left, 0, + fillRect.left, 0, temp, int(strlen(temp)) ); ExcludeClipRect(hdc, topMargin.left, topMargin.top, topMargin.right, topMargin.bottom); @@ -164,13 +164,14 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks) FillRect( hdc, &topMargin, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); /* pad left margin to the left edge */ +#if 0 RECT leftMargin; leftMargin.top = trackTop; leftMargin.bottom = rcTracks.bottom; leftMargin.left = 0; leftMargin.right = leftMarginWidth; FillRect( hdc, &leftMargin, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); - +#endif /* right margin */ RECT rightMargin; @@ -178,6 +179,7 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks) rightMargin.bottom = rcTracks.bottom; rightMargin.left = trackLeft; rightMargin.right = rcTracks.right; +// DrawEdge(hdc, &rightMargin, BDR_SUNKENINNER | BDR_RAISEDOUTER, BF_ADJUST | BF_LEFT); FillRect( hdc, &rightMargin, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); }