◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── Windows 3.1 only BOOL SubclassWindow( HWND hwnd ); Parameter Description <hwnd> A handle to the window. Remarks Attaches a window to a CWnd object and replaces the window's WndProc and AfxWndProc. It stores the old WndProc in the location returned by GetSuperWndProc, which is used for default message processing (see CWnd::DefWindowProc). You must override GetSuperWndProcAddr for every unique window class to provide a place to store the old WndProc. The operation of replacing a WndProc with a new one, saving the old one and calling it a "super class," is known as "dynamically subclassing" a window. Return Value TRUE if the function is successful; otherwise, FALSE. See Also ◄CWnd::GetSuperWndProcAddr►, ◄CWnd::Attach► -♦-