Change background color
This commit is contained in:
2 files changed
+27
-2
No files matched your search
@@ -79,6 +79,31 @@ namespace watchfuleye {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_ERASEBKGND: {
|
||||
HDC hDC = reinterpret_cast<HDC>(wParam);
|
||||
|
||||
HBRUSH backgroundBrush = CreateSolidBrush(RGB(255, 150, 150));
|
||||
|
||||
RECT clientRect = {};
|
||||
GetClientRect(dlg, &clientRect);
|
||||
FillRect(hDC, &clientRect, backgroundBrush);
|
||||
|
||||
DeleteObject(backgroundBrush);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_CTLCOLORSTATIC: {
|
||||
if (GetWindowLongPtr(reinterpret_cast<HWND>(lParam), GWL_EXSTYLE) & WS_EX_TRANSPARENT) {
|
||||
std::cout << "Test\n";
|
||||
SetBkMode(reinterpret_cast<HDC>(wParam), TRANSPARENT);
|
||||
|
||||
return reinterpret_cast<INT_PTR>(GetStockObject(NULL_BRUSH));
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
case WM_CLOSE: {
|
||||
// Do nothing
|
||||
return TRUE;
|
||||
|
||||
Reference in new issue
Block a user