50 lines
1.4 KiB
C++
50 lines
1.4 KiB
C++
// aboutdlg.cpp : implementation of the CFindDlg class
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "stdafx.h"
|
|
#include "resource.h"
|
|
|
|
#include "FindDlg.h"
|
|
|
|
LRESULT CFindDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
|
{
|
|
CenterWindow(GetParent());
|
|
DlgResize_Init();
|
|
m_ListBox.Attach(GetDlgItem(IDC_LAYERLIST));
|
|
LONG lCount;
|
|
|
|
CWhip2DCImpl m_iWhip2DC;
|
|
CDWFFileImpl m_iDWFFile;
|
|
CEPlotSectionsImpl *piEPlotSections;
|
|
m_iDWFFile.Open(m_dwfPath);
|
|
|
|
piEPlotSections = m_iDWFFile.get_EPlotSections();
|
|
lCount = piEPlotSections->get_Count();
|
|
if (lCount > 0)
|
|
{
|
|
m_iWhip2DC.Load(NULL, piEPlotSections->get_Item(m_nPage), L"", L".*",
|
|
1000, 800, VARIANT_TRUE /*center*/, VARIANT_FALSE /* Maximize */);
|
|
}
|
|
else
|
|
{
|
|
m_iWhip2DC.Load(NULL, NULL, m_dwfPath, L".*", 1000, 800, VARIANT_TRUE /*center*/, VARIANT_FALSE /* Maximize */);
|
|
}
|
|
m_iWhip2DC.FindTexts("");
|
|
m_iWhip2DC.get_TextCount(&lCount);
|
|
for (int i=0;i < lCount;i++)
|
|
{
|
|
CFoundText tFound;
|
|
m_iWhip2DC.get_TextItem(i, tFound);
|
|
if (tFound.m_FoundText.string().is_ascii())
|
|
m_ListBox.AddString(CString(tFound.m_FoundText.string().ascii()));
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
LRESULT CFindDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
|
{
|
|
EndDialog(wID);
|
|
return 0;
|
|
}
|