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.

52 lines
1.4 KiB

  1. #pragma once
  2. #include "atlwin.h"
  3. class CSxApwHostMdiClient : public ATL::CWindowImpl<CSxApwHostMdiClient>
  4. {
  5. public:
  6. BEGIN_MSG_MAP(CSxApwHostMdiClient)
  7. END_MSG_MAP()
  8. DECLARE_WND_SUPERCLASS(NULL, L"MdiClient")
  9. CSxApwHostMdiClient() { }
  10. ~CSxApwHostMdiClient() { }
  11. };
  12. class CSxApwHostMdiChild : public ATL::CWindowImpl<CSxApwHostMdiChild, ATL::CWindow, ATL::CMDIChildWinTraits>
  13. {
  14. public:
  15. BEGIN_MSG_MAP(CSxApwHostMdiChild)
  16. END_MSG_MAP()
  17. // CWindowImpl doesn't have a constructor from HWND, which leads to
  18. // a compilation error.
  19. // compiler ICE
  20. //CSxApwHostMdiChild(HWND hwnd) : ATL::CWindow(hwnd) { }
  21. CSxApwHostMdiChild(HWND hwnd) { Attach(hwnd); }
  22. CSxApwHostMdiChild() { }
  23. ~CSxApwHostMdiChild() { }
  24. };
  25. class CSxApwHostAxMdiChild : public ATL::CAxWindowT<CSxApwHostMdiChild>
  26. {
  27. public:
  28. BEGIN_MSG_MAP(CSxApwHostAxMdiChild)
  29. END_MSG_MAP()
  30. CSxApwHostAxMdiChild(HWND hwnd) { Attach(hwnd); }
  31. CSxApwHostAxMdiChild() { }
  32. ~CSxApwHostAxMdiChild() { }
  33. HWND Create(HWND hWndParent, RECT& rcPos, LPCTSTR szWindowName = NULL,
  34. DWORD dwStyle = 0, DWORD dwExStyle = 0,
  35. UINT nID = 0, LPVOID lpCreateParam = NULL)
  36. {
  37. //
  38. // Skip CAxWindowT's Create, and get WindowImpl's, which ors in the
  39. // traits's styles.
  40. //
  41. return CSxApwHostMdiChild::Create(hWndParent, rcPos, szWindowName, dwStyle, dwExStyle, nID, lpCreateParam);
  42. }
  43. };