Skip to content

Commit

Permalink
Make space for offsets (dirty implementation)
Browse files Browse the repository at this point in the history
  • Loading branch information
dl471 committed Oct 22, 2018
1 parent c514a27 commit f52b888
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Windows/Debugger/CtrlMemView.cpp
Expand Up @@ -277,7 +277,14 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
SelectObject(hdc,oldBrush);

// copy bitmap to the actual hdc
BitBlt(actualHdc,0,0,rect.right,rect.bottom,hdc,0,0,SRCCOPY);
if (writeOffsets)
{
BitBlt(actualHdc, 0, rowHeight*2, rect.right, rect.bottom, hdc, 0, 0, SRCCOPY);
}
else
{
BitBlt(actualHdc, 0, 0, rect.right, rect.bottom, hdc, 0, 0, SRCCOPY);
}
DeleteObject(hBM);
DeleteDC(hdc);

Expand Down Expand Up @@ -409,6 +416,10 @@ void CtrlMemView::redraw()
GetClientRect(wnd, &rect);
visibleRows = (rect.bottom/rowHeight);

if (writeOffsets) {
visibleRows -= 2;
}

InvalidateRect(wnd, NULL, FALSE);
UpdateWindow(wnd);
}
Expand Down Expand Up @@ -517,6 +528,10 @@ void CtrlMemView::gotoPoint(int x, int y)
int line = y/rowHeight;
int lineAddress = windowStart+line*rowSize;

if (writeOffsets) {
lineAddress -= (rowSize * 2);
}

if (x >= asciiStart)
{
int col = (x-asciiStart) / (charWidth+2);
Expand Down

0 comments on commit f52b888

Please sign in to comment.