diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-14 17:13:52 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-14 17:13:52 -0400 |
| commit | 5ca3f0f0f9ccdb9fd2301e0b8b7503302c1b83c4 (patch) | |
| tree | 1e3b945213b52df4a9ab7dc0a80c089eef8990ef /redo/common_windows.c | |
| parent | 307577889e3fda28cad8f38ea34c184d9ab4a254 (diff) | |
Made Labels on Windows transparent.
Diffstat (limited to 'redo/common_windows.c')
| -rw-r--r-- | redo/common_windows.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/redo/common_windows.c b/redo/common_windows.c index 153aa76..d5d7c72 100644 --- a/redo/common_windows.c +++ b/redo/common_windows.c @@ -80,6 +80,8 @@ static LRESULT forwardNotify(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) // TODO give this a better name BOOL sharedWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *lResult) { + DWORD exstyle; + switch (uMsg) { case WM_COMMAND: *lResult = forwardCommand(hwnd, uMsg, wParam, lParam); @@ -87,6 +89,15 @@ BOOL sharedWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT * case WM_NOTIFY: *lResult = forwardNotify(hwnd, uMsg, wParam, lParam); return TRUE; + case WM_CTLCOLORSTATIC: + exstyle = (DWORD) GetWindowLongPtrW((HWND) lParam, GWL_EXSTYLE); + if ((exstyle & WS_EX_TRANSPARENT) != 0) { + if (SetBkMode((HDC) wParam, TRANSPARENT) == 0) + xpanic("error setting transparent background mode to Labels", GetLastError()); + *lResult = (LRESULT) hollowBrush; + return TRUE; + } + return FALSE; } return FALSE; } |
