Leaked source code of windows server 2003
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.

51 lines
1.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: listpad.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. // ListPad.cpp : Implementation of CListPad
  11. #include "stdafx.h"
  12. #include "cic.h"
  13. #include "ListPad.h"
  14. #include "findview.h"
  15. #include "strings.h"
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CListPad
  18. HRESULT CListPad::OnPostVerbInPlaceActivate()
  19. {
  20. // set up the window hierarchy
  21. if (m_MMChWnd == NULL)
  22. {
  23. // walk the parent windows until we hit one we recognize
  24. HWND hwnd = FindMMCView(m_hWnd);
  25. // found it!
  26. if (hwnd)
  27. {
  28. // hang onto this to prevent reconnections
  29. m_MMChWnd = hwnd;
  30. m_ListViewHWND = NULL;
  31. // send a message to pull the old switcheroo
  32. ::SendMessage (m_MMChWnd, MMC_MSG_CONNECT_TO_TPLV, (WPARAM)m_hWnd, (LPARAM)&m_ListViewHWND);
  33. }
  34. }
  35. // when navigating back to a listpad using history, need to reconnect the listpad. The test for this
  36. // is that both windows already exist and the parent of the list view is the amcview, indicating that the
  37. // connection has not yet taken place
  38. if(m_MMChWnd && m_ListViewHWND && (::GetParent(m_ListViewHWND)==m_MMChWnd) )
  39. {
  40. // send a message to pull the old switcheroo
  41. ::SendMessage (m_MMChWnd, MMC_MSG_CONNECT_TO_TPLV, (WPARAM)m_hWnd, (LPARAM)&m_ListViewHWND);
  42. }
  43. return S_OK;
  44. }