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
51 lines
1.6 KiB
//+-------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
//
|
|
// Copyright (C) Microsoft Corporation, 1999 - 1999
|
|
//
|
|
// File: listpad.cpp
|
|
//
|
|
//--------------------------------------------------------------------------
|
|
|
|
// ListPad.cpp : Implementation of CListPad
|
|
#include "stdafx.h"
|
|
#include "cic.h"
|
|
#include "ListPad.h"
|
|
#include "findview.h"
|
|
#include "strings.h"
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CListPad
|
|
|
|
HRESULT CListPad::OnPostVerbInPlaceActivate()
|
|
{
|
|
// set up the window hierarchy
|
|
if (m_MMChWnd == NULL)
|
|
{
|
|
// walk the parent windows until we hit one we recognize
|
|
HWND hwnd = FindMMCView(m_hWnd);
|
|
|
|
// found it!
|
|
if (hwnd)
|
|
{
|
|
// hang onto this to prevent reconnections
|
|
m_MMChWnd = hwnd;
|
|
m_ListViewHWND = NULL;
|
|
|
|
// send a message to pull the old switcheroo
|
|
::SendMessage (m_MMChWnd, MMC_MSG_CONNECT_TO_TPLV, (WPARAM)m_hWnd, (LPARAM)&m_ListViewHWND);
|
|
}
|
|
}
|
|
|
|
// when navigating back to a listpad using history, need to reconnect the listpad. The test for this
|
|
// is that both windows already exist and the parent of the list view is the amcview, indicating that the
|
|
// connection has not yet taken place
|
|
if(m_MMChWnd && m_ListViewHWND && (::GetParent(m_ListViewHWND)==m_MMChWnd) )
|
|
{
|
|
// send a message to pull the old switcheroo
|
|
::SendMessage (m_MMChWnd, MMC_MSG_CONNECT_TO_TPLV, (WPARAM)m_hWnd, (LPARAM)&m_ListViewHWND);
|
|
}
|
|
|
|
return S_OK;
|
|
}
|