Add outline
This commit is contained in:
parent
81b8ceb3d9
commit
8882894f09
@ -39,6 +39,7 @@ namespace watchfuleye {
|
||||
, m_greenBrush(nullptr)
|
||||
, m_yellowBrush(nullptr)
|
||||
, m_redBrush(nullptr)
|
||||
, m_outlinePen(nullptr)
|
||||
, m_offscreenDC(nullptr)
|
||||
, m_offscreenBitmap(nullptr)
|
||||
{
|
||||
@ -116,6 +117,8 @@ namespace watchfuleye {
|
||||
app->m_yellowBrush = CreateSolidBrush(RGB(255, 255, 150));
|
||||
app->m_redBrush = CreateSolidBrush(RGB(255, 150, 150));
|
||||
|
||||
app->m_outlinePen = CreatePen(PS_SOLID, 5, RGB(0, 0, 0));
|
||||
|
||||
// App will update (repaint) at 5 FPS
|
||||
SendMessage(hWnd, WM_UPDATE, NULL, NULL);
|
||||
SetTimer(hWnd, IDT_UPDATE, 200, nullptr);
|
||||
@ -240,6 +243,12 @@ namespace watchfuleye {
|
||||
|
||||
FillRect(app->m_offscreenDC, &clientRect, backgroundBrush);
|
||||
|
||||
// Draw outline
|
||||
SelectObject(app->m_offscreenDC, GetStockObject(NULL_BRUSH));
|
||||
SelectObject(app->m_offscreenDC, app->m_outlinePen);
|
||||
|
||||
RoundRect(app->m_offscreenDC, 1, 1, WINDOW_WIDTH - 2, WINDOW_HEIGHT - 2, 20, 20);
|
||||
|
||||
// Setup text options
|
||||
SetTextColor(app->m_offscreenDC, RGB(0, 0, 0));
|
||||
SetBkMode(app->m_offscreenDC, TRANSPARENT);
|
||||
|
||||
@ -38,6 +38,7 @@ namespace watchfuleye {
|
||||
HRGN m_region;
|
||||
HFONT m_timeFont, m_lowerFont;
|
||||
HBRUSH m_greenBrush, m_yellowBrush, m_redBrush;
|
||||
HPEN m_outlinePen;
|
||||
HDC m_offscreenDC;
|
||||
HBITMAP m_offscreenBitmap;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user