I use EVC++ and created a skeleton MFC application. Now I want to set a
filter to the doclist to show only *.zce files. There is no method in
CCeDocList object (MFC) to set a new filter string.
I'm not used to programming with EVC++ and MFC.
I tried:
-------
void CMainFrame::OnCreateDocList(
DLNHDR* pNotifyStruct, LRESULT* result)
{
strcpy(FilterListStr,(char*) MakeString(IDS_FILE_FILTER));
/* '*.zce' */
strcpy(FolderStr,(char*) MakeString(IDS_FOLDER));
/* '\' */
CCeDocList* pDocList =
(CCeDocList*)FromHandle(pNotifyStruct->nmhdr.hwndFrom);
ASSERT_KINDOF(CCeDocList, pDocList);
/* this did not work !
pDocList->Create(GetActiveWindow(),
(const unsigned short *) FilterListStr,
(const unsigned short *) FolderStr,
DLF_SHOWEXTENSION );
pDocList->SetFilterIndex(1);
*/
CCeCommandBar* pDocListCB = pDocList->GetCommandBar();
ASSERT(pDocListCB != NULL);
pDocListCB->InsertMenuBar(IDM_DOCLIST);
pDocListCB->SendMessage(TB_SETTOOLTIPS, (WPARAM)(1),
(LPARAM)(m_ToolTipsTable));
CFrameWnd::OnCreateDocList(pNotifyStruct, result);
}
--------
Can you help me?
Martin Rhinow