Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
691 B

  1. //
  2. // CWnd.h
  3. //
  4. #pragma once
  5. class CWnd
  6. {
  7. public:
  8. CWnd();
  9. void Release();
  10. BOOL Attach(HWND hwnd);
  11. static CWnd* FromHandle(HWND hwnd);
  12. public:
  13. HWND m_hWnd;
  14. protected:
  15. // This is what subclasses implement
  16. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) PURE;
  17. // Subclasses call CWnd::Default to forward the message to the original wndproc
  18. LRESULT Default(UINT message, WPARAM wParam, LPARAM lParam);
  19. virtual ~CWnd();
  20. private:
  21. static LRESULT CALLBACK StaticWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  22. void OnNCDESTROY();
  23. private:
  24. WNDPROC m_pfnPrevWindowProc;
  25. UINT m_cRef;
  26. };