subclassed background window behind the visible desktop window More...
#include <desktop.h>
Public Types | |
typedef SubclassedWindow | super |
Public Member Functions | |
BackgroundWindow (HWND hwnd) | |
Protected Member Functions | |
LRESULT | WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam) |
void | DrawDesktopBkgnd (HDC hdc) |
Protected Attributes | |
int | _display_version |
subclassed background window behind the visible desktop window
Definition at line 35 of file desktop.h.
Reimplemented from SubclassedWindow.
BackgroundWindow::BackgroundWindow | ( | HWND | hwnd ) |
Definition at line 257 of file desktop.cpp.
References _display_version, RegGetDWORDValue(), and TEXT.
: super(hwnd) { // set background brush for the short moment of displaying the // background color while moving foreground windows SetClassLong(hwnd, GCL_HBRBACKGROUND, COLOR_BACKGROUND+1); _display_version = RegGetDWORDValue(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), TEXT("PaintDesktopVersion"), 1); }
void BackgroundWindow::DrawDesktopBkgnd | ( | HDC | hdc ) | [protected] |
Definition at line 299 of file desktop.cpp.
Referenced by WndProc().
{ PaintDesktop(hdc); /* special solid background HBRUSH bkgndBrush = CreateSolidBrush(RGB(0,32,160)); // dark blue FillRect(hdc, &rect, bkgndBrush); DeleteBrush(bkgndBrush); */ }
LRESULT BackgroundWindow::WndProc | ( | UINT | nmsg, |
WPARAM | wparam, | ||
LPARAM | lparam | ||
) | [protected, virtual] |
Reimplemented from SubclassedWindow.
Definition at line 267 of file desktop.cpp.
References _display_version, WindowHandle::_hwnd, ExplorerGlobals::_hwndDesktop, DrawDesktopBkgnd(), g_Globals, PM_DISPLAY_VERSION, RegSetDWORDValue(), TEXT, and SubclassedWindow::WndProc().
{ switch(nmsg) { case WM_ERASEBKGND: DrawDesktopBkgnd((HDC)wparam); return TRUE; case WM_MBUTTONDBLCLK: /* Imagelist icons are missing if MainFrame::Create() is called directly from here! explorer_show_frame(SW_SHOWNORMAL); */ PostMessage(g_Globals._hwndDesktop, nmsg, wparam, lparam); break; case PM_DISPLAY_VERSION: if (lparam || wparam) { DWORD or_mask = wparam; DWORD reset_mask = LOWORD(lparam); DWORD xor_mask = HIWORD(lparam); _display_version = ((_display_version&~reset_mask) | or_mask) ^ xor_mask; RegSetDWORDValue(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), TEXT("PaintDesktopVersion"), _display_version); ///@todo Changing the PaintDesktopVersion-Flag needs a restart of the shell -> display a message box InvalidateRect(_hwnd, NULL, TRUE); } return _display_version; default: return super::WndProc(nmsg, wparam, lparam); } return 0; }
int BackgroundWindow::_display_version [protected] |
Definition at line 46 of file desktop.h.
Referenced by BackgroundWindow(), and WndProc().
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |