Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

BackgroundWindow Struct Reference

subclassed background window behind the visible desktop window More...

#include <desktop.h>

Inheritance diagram for BackgroundWindow:
Inheritance graph
[legend]
Collaboration diagram for BackgroundWindow:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

subclassed background window behind the visible desktop window

Definition at line 35 of file desktop.h.


Member Typedef Documentation

Reimplemented from SubclassedWindow.

Definition at line 37 of file desktop.h.


Constructor & Destructor Documentation

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);
}

Here is the call graph for this function:


Member Function Documentation

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);
*/
}

Here is the caller graph for this function:

LRESULT BackgroundWindow::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [protected, virtual]

Todo:
Changing the PaintDesktopVersion-Flag needs a restart of the shell -> display a message box

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;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 46 of file desktop.h.

Referenced by BackgroundWindow(), and WndProc().


The documentation for this struct was generated from the following files:

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage