我再重写CFileDialog,想改变文件察看的方式为缩略图,我已经得到list的控件指针如下,请问如何更改。CWnd *wndDlg = GetParent();
wndDlg -> GetDlgItem(lst1) -〉????????????

解决方案 »

  1.   

    XP才支持IFolderView 
     IShellView *pshv = NULL;
     IShellBrowser *pshb=(IShellBrowser *)GetParent()->SendMessage(WM_GETISHELLBROWSER,0,0);
     HRESULT hr = pshb->QueryActiveShellView(&pshv);
     if(SUCCEEDED(hr))
     {
     IFolderView *pfv = NULL;
     pshv->QueryInterface(IID_IFolderView,(void**)&pfv);
     if(pfv)
    pfv->SetCurrentViewMode(FVM_THUMBNAIL);
     }
      

  2.   

    #ifndef WM_GETISHELLBROWSER
       #define WM_GETISHELLBROWSER (WM_USER+7)
    #endif
      

  3.   

    还有一个问题,就是我能不能直接利用wndDlg -> GetDlgItem(lst1) -〉????????????呢?我看到一个例子,就是说可以更改的。但是我没有下在下来源代码就是仿照资源管理器的那种?