Permalink
Browse files

Make space for offsets (dirty implementation)

  • Loading branch information...
dl471 committed Oct 21, 2018
1 parent c514a27 commit f52b88818649d56a1e49f967cbdd11333ca1dae6
Showing with 16 additions and 1 deletion.
  1. +16 −1 Windows/Debugger/CtrlMemView.cpp
@@ -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);
@@ -409,6 +416,10 @@ void CtrlMemView::redraw()
GetClientRect(wnd, &rect);
visibleRows = (rect.bottom/rowHeight);
if (writeOffsets) {
visibleRows -= 2;
}
InvalidateRect(wnd, NULL, FALSE);
UpdateWindow(wnd);
}
@@ -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);

0 comments on commit f52b888

Please sign in to comment.