mirror of
https://github.com/quantum5/Zalgo.git
synced 2025-04-24 13:41:57 -04:00
Fixed background colour problems.
This commit is contained in:
parent
2dab6674f0
commit
19eb082fd6
|
@ -68,7 +68,6 @@ protected:
|
||||||
PreviewWindow *m_preview, *m_data_display;
|
PreviewWindow *m_preview, *m_data_display;
|
||||||
private:
|
private:
|
||||||
HFONT hFont;
|
HFONT hFont;
|
||||||
HBRUSH hBrush;
|
|
||||||
UDACCEL *udaSecondAccel;
|
UDACCEL *udaSecondAccel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ UINT ZALGO_MESS_LEVEL_[3] = {6, 10, 14};
|
||||||
#pragma comment(lib, "comdlg32.lib")
|
#pragma comment(lib, "comdlg32.lib")
|
||||||
|
|
||||||
WNDPROC wpOrigEditProc;
|
WNDPROC wpOrigEditProc;
|
||||||
DWORD rgbWindowBackground;
|
|
||||||
|
|
||||||
wchar_t *GetResourceString(int id, HMODULE module = NULL) {
|
wchar_t *GetResourceString(int id, HMODULE module = NULL) {
|
||||||
HRSRC hRC;
|
HRSRC hRC;
|
||||||
|
@ -73,8 +72,6 @@ LRESULT MainWindow::OnCreate()
|
||||||
GetClientRect(m_hwnd, &client);
|
GetClientRect(m_hwnd, &client);
|
||||||
GetMessageFont(lf);
|
GetMessageFont(lf);
|
||||||
hFont = CreateFontIndirect(&lf);
|
hFont = CreateFontIndirect(&lf);
|
||||||
hBrush = GetSysColorBrush(COLOR_WINDOW);
|
|
||||||
rgbWindowBackground = GetSysColor(COLOR_WINDOW);
|
|
||||||
|
|
||||||
initial = GetResourceString(RID_INIT);
|
initial = GetResourceString(RID_INIT);
|
||||||
if (!initial)
|
if (!initial)
|
||||||
|
@ -400,15 +397,10 @@ LRESULT MainWindow::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WM_CTLCOLORSTATIC: {
|
case WM_CTLCOLORSTATIC: {
|
||||||
HBRUSH white = CreateSolidBrush(RGB(255, 255, 255));
|
HBRUSH white = GetStockBrush(WHITE_BRUSH);
|
||||||
if ((HWND) lParam == m_messLevel && IsWindowEnabled(m_messLevel))
|
if ((HWND) lParam == m_messLevel && IsWindowEnabled(m_messLevel))
|
||||||
return (LRESULT) white;
|
return (LRESULT) white;
|
||||||
if ((HWND) lParam == m_settings) {
|
break;
|
||||||
SetBkColor((HDC) wParam, GetSysColor(COLOR_3DFACE));
|
|
||||||
return (LRESULT) GetSysColorBrush(COLOR_3DFACE);
|
|
||||||
}
|
|
||||||
SetBkColor((HDC) wParam, rgbWindowBackground);
|
|
||||||
return (LRESULT) hBrush;
|
|
||||||
}
|
}
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
if (wParam == 'K' && GetKeyState(VK_CONTROL) < 0 &&
|
if (wParam == 'K' && GetKeyState(VK_CONTROL) < 0 &&
|
||||||
|
|
|
@ -25,7 +25,7 @@ void Window::Register()
|
||||||
wc.hInstance = GetInstance();
|
wc.hInstance = GetInstance();
|
||||||
wc.hIcon = GetIcon();
|
wc.hIcon = GetIcon();
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hbrBackground = CreateSolidBrush(RGB(0xF0, 0xF0, 0xF0));
|
wc.hbrBackground = (HBRUSH) (COLOR_3DFACE + 1);
|
||||||
wc.lpszMenuName = NULL;
|
wc.lpszMenuName = NULL;
|
||||||
wc.lpszClassName = ClassName();
|
wc.lpszClassName = ClassName();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue