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

Re: EVC++: How can I set filter in pDocList ? by Amit

Amit
Tue Sep 09 01:34:22 CDT 2003

Check it out...
http://groups.google.com/groups?q=CCeDocList+SetFilterIndex&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=r0PFlp%23bCHA.1676%40cpmsftngxa08&rnum=1

Hope it is of some help to you....
Regards
Amit
"Martin Rhinow" <martin.rhinow@t-online.de> wrote in message
news:bjifl4$fs$07$1@news.t-online.com...
> 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
>