SubclassedWindow is used to wrap already existing window handles into C++ Window objects. More...
#include <window.h>


Public Types | |
| typedef Window | super |
Public Member Functions | |
| SubclassedWindow (HWND) | |
Protected Member Functions | |
| virtual LRESULT | WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam) |
| virtual int | Command (int id, int code) |
| virtual int | Notify (int id, NMHDR *pnmh) |
Static Protected Member Functions | |
| static LRESULT CALLBACK | SubclassedWndProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) |
Protected Attributes | |
| WNDPROC | _orgWndProc |
SubclassedWindow is used to wrap already existing window handles into C++ Window objects.
To construct a object, use the "new" operator to put it in the heap. It is automatically freed, when the window gets destroyed.
Definition at line 176 of file window.h.
| typedef Window SubclassedWindow::super |
| SubclassedWindow::SubclassedWindow | ( | HWND | hwnd ) |
Definition at line 304 of file window.cpp.
References WindowHandle::_hwnd, _orgWndProc, and SubclassedWndProc().
: super(hwnd) { _orgWndProc = SubclassWindow(_hwnd, SubclassedWndProc); if (!_orgWndProc) delete this; }

| int SubclassedWindow::Command | ( | int | id, |
| int | code | ||
| ) | [protected, virtual] |
Reimplemented from Window.
Reimplemented in DesktopShellView, and QuickLaunchBar.
Definition at line 351 of file window.cpp.
Referenced by DesktopShellView::Command(), and SubclassedWndProc().
{
return 1; // no command handler found
}

| int SubclassedWindow::Notify | ( | int | id, |
| NMHDR * | pnmh | ||
| ) | [protected, virtual] |
Reimplemented from Window.
Reimplemented in DesktopShellView, Pane, and QuickLaunchBar.
Definition at line 356 of file window.cpp.
References WindowHandle::_hwnd, and _orgWndProc.
Referenced by QuickLaunchBar::Notify(), Pane::Notify(), DesktopShellView::Notify(), and SubclassedWndProc().
{
return CallWindowProc(_orgWndProc, _hwnd, WM_NOTIFY, id, (LPARAM)pnmh);
}

| LRESULT CALLBACK SubclassedWindow::SubclassedWndProc | ( | HWND | hwnd, |
| UINT | nmsg, | ||
| WPARAM | wparam, | ||
| LPARAM | lparam | ||
| ) | [static, protected] |
Definition at line 313 of file window.cpp.
References _orgWndProc, Command(), GET_WINDOW, Window::Init(), NFR_CURRENT, Notify(), and WndProc().
Referenced by SubclassedWindow().
{
SubclassedWindow* pThis = GET_WINDOW(SubclassedWindow, hwnd);
assert(pThis);
if (pThis) {
switch(nmsg) {
case WM_COMMAND:
if (!pThis->Command(LOWORD(wparam), HIWORD(wparam)))
return 0;
break;
case WM_NOTIFY:
return pThis->Notify(wparam, (NMHDR*)lparam);
case WM_NOTIFYFORMAT:
return NFR_CURRENT;
case WM_CREATE:
return pThis->Init((LPCREATESTRUCT)lparam);
case WM_NCDESTROY:
delete pThis;
return 0;
default:
return pThis->WndProc(nmsg, wparam, lparam);
}
}
return CallWindowProc(pThis->_orgWndProc, hwnd, nmsg, wparam, lparam);
}


| LRESULT SubclassedWindow::WndProc | ( | UINT | nmsg, |
| WPARAM | wparam, | ||
| LPARAM | lparam | ||
| ) | [protected, virtual] |
Reimplemented from Window.
Reimplemented in BackgroundWindow, DesktopShellView, Pane, StartButton, QuickLaunchBar, StartMenuButton, OwnerdrawnButton, FlatButton, ColorStatic, HyperlinkCtrl, EditController, and ExtContextMenuHandlerT< SubclassedWindow >.
Definition at line 346 of file window.cpp.
References WindowHandle::_hwnd, and _orgWndProc.
Referenced by SubclassedWndProc(), ColorStatic::WndProc(), HyperlinkCtrl::WndProc(), OwnerdrawnButton::WndProc(), Pane::WndProc(), and BackgroundWindow::WndProc().
{
return CallWindowProc(_orgWndProc, _hwnd, nmsg, wparam, lparam);
}

WNDPROC SubclassedWindow::_orgWndProc [protected] |
Definition at line 183 of file window.h.
Referenced by Notify(), SubclassedWindow(), SubclassedWndProc(), and WndProc().
|
ROS Explorer Source Code Documentation
generated on 02.01.2013 by
|