con(ICO_FONTFILE));
mImageList->Add(pApp->LoadIcon(ICO_FOXPROFILE));
mImageList->Add(pApp->LoadIcon(ICO_GENERALFILE));
mImageList->Add(pApp->LoadIcon(ICO_HEADERFILE));
mImageList->Add(pApp->LoadIcon(ICO_HELPFILE));
mImageList->Add(pApp->LoadIcon(ICO_HTMLDOC));
mImageList->Add(pApp->LoadIcon(ICO_HTMLHELP));
mImageList->Add(pApp->LoadIcon(ICO_IMAGEFILE));
mImageList->Add(pApp->LoadIcon(ICO_INFO));
mImageList->Add(pApp->LoadIcon(ICO_JAVABEAN));
mImageList->Add(pApp->LoadIcon(ICO_JAVACLASSES));
mImageList->Add(pApp->LoadIcon(ICO_JAVASOURCE));
mImageList->Add(pApp->LoadIcon(ICO_MYCOMP));
mImageList->Add(pApp->LoadIcon(ICO_OPENFLD));
mImageList->Add(pApp->LoadIcon(ICO_PDFFILE));
mImageList->Add(pApp->LoadIcon(ICO_QUESTION));
mImageList->Add(pApp->LoadIcon(ICO_REGISTRYFILE));
mImageList->Add(pApp->LoadIcon(ICO_SETUPFILE));
mImageList->Add(pApp->LoadIcon(ICO_SOUNDFILE));
mImageList->Add(pApp->LoadIcon(ICO_TEXTFILE));
mImageList->Add(pApp->LoadIcon(ICO_TRASHFILE));
mImageList->Add(pApp->LoadIcon(ICO_UNINSTALLFILE));
mImageList->Add(pApp->LoadIcon(ICO_VIDEOFILE));
mImageList->Add(pApp->LoadIcon(ICO_WINDOWSFILE));
mImageList->Add(pApp->LoadIcon(ICO_WORDDOC));
mImageList->Add(pApp->LoadIcon(ICO_ZIPFILE));
mImageList->Add(pApp->LoadIcon(ICO_CDUP));
return ;
}
void CDriveExplorerView::OnDestroy()
{
CListView::OnDestroy();
// TODO: Add your message handler code here
if(m_pImageList != NULL)
m_pImageList = NULL;
if(m_pImageListL != NULL)
m_pImageListL = NULL;
delete m_pImageList;
delete m_pImageListL;
}
void CDriveExplorerView::OnSize(UINT nType, int cx, int cy)
{
CListView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
if(GetListCtrl().GetSafeHwnd())
{
GetListCtrl().SetColumnWidth(0, cx / 2);
GetListCtrl().SetColumnWidth(1, cx / 4);
GetListCtrl().SetColumnWidth(2, cx / 4);
}
}
///////////////////////////////////////////////////////////////////////////////////
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
CCreateContext* pContext)
{
// create splitter window
if (!m_wndSplitter.CreateStatic(this, 1, 2))
return FALSE;
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView),
CSize(100, 100), pContext) ||!m_wndSplitter.CreateView(0, 1,
RUNTIME_CLASS(CDriveExplorerView), CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
m_wndSplitter.SetColumnInfo(0, 200, 100);
return TRUE;
}
CDriveExplorerView* CMainFrame::GetRightPane()
{
CDriveExplorerView* pView=(CDriveExplorerView*)m_wndSplitter.GetPane(0, 1);
return pView;
}
void CMainFrame::OnUpdateViewStyles(CCmdUI* pCmdUI)
{
CDriveExplorerView* pView = GetRightPane();
if (pView == NULL)
pCmdUI->Enable(FALSE);
else
{
DWORD dwStyle = pView->GetStyle() & LVS_TYPEMASK;
if (pCmdUI->m_nID == ID_VIEW_LINEUP)
{
if (dwStyle =