ThumbnailFileDialog.cpp
上传用户:fengshi120
上传日期:2014-07-17
资源大小:6155k
文件大小:1k
源码类别:

3D图形编程

开发平台:

C/C++

  1. // ThumbnailFileDialog.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "StereoPlus.h"
  5. #include "ThumbnailFileDialog.h"
  6. #include ".thumbnailfiledialog.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. enum SHVIEW_ListViewModes 
  13. {
  14. SHVIEW_Default = 0 ,
  15. SHVIEW_ICON = 0x7029 ,
  16. SHVIEW_LIST = 0x702B ,
  17. SHVIEW_REPORT = 0x702C ,
  18. SHVIEW_THUMBNAIL= 0x702D ,
  19. SHVIEW_TILE = 0x702E
  20. } ;
  21. // CThumbnailFileDialog
  22. IMPLEMENT_DYNAMIC(CThumbnailFileDialog, CFileDialog)
  23. CThumbnailFileDialog::CThumbnailFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
  24. DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
  25. CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
  26. {
  27. }
  28. CThumbnailFileDialog::~CThumbnailFileDialog()
  29. {
  30. }
  31. BEGIN_MESSAGE_MAP(CThumbnailFileDialog, CFileDialog)
  32. END_MESSAGE_MAP()
  33. // CThumbnailFileDialog message handlers
  34. BOOL CThumbnailFileDialog::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
  35. {
  36. CWnd* pParent = GetParent() ;
  37. CWnd* pList = FindWindowEx(pParent->m_hWnd, NULL, "SHELLDLL_DefView", NULL) ;
  38. if( pList )
  39. {
  40. pList->SendMessage( WM_COMMAND, SHVIEW_THUMBNAIL,0) ;
  41. // once found we don't need to change it again
  42. }
  43. return CFileDialog::OnNotify(wParam, lParam, pResult);
  44. }