Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.3 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998
  4. *
  5. * TITLE: COMTRANS.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 9/28/1999
  12. *
  13. * DESCRIPTION: Transfer page. Gets the destination path and filename.
  14. *
  15. *******************************************************************************/
  16. #ifndef __COMTRANS_H_INCLUDED
  17. #define __COMTRANS_H_INCLUDED
  18. #include <windows.h>
  19. #include "acqmgrcw.h"
  20. #include "mru.h"
  21. class CCommonTransferPage
  22. {
  23. private:
  24. // Private data
  25. HWND m_hWnd;
  26. UINT m_nWiaEventMessage;
  27. CAcquisitionManagerControllerWindow *m_pControllerWindow;
  28. CMruStringList m_MruRootFilename;
  29. CMruDestinationData m_MruDirectory;
  30. bool m_bUseSubdirectory;
  31. GUID m_guidLastSelectedType;
  32. HFONT m_hFontBold;
  33. private:
  34. // No implementation
  35. CCommonTransferPage(void);
  36. CCommonTransferPage( const CCommonTransferPage & );
  37. CCommonTransferPage &operator=( const CCommonTransferPage & );
  38. private:
  39. // Constructor and destructor
  40. explicit CCommonTransferPage( HWND hWnd );
  41. ~CCommonTransferPage(void);
  42. private:
  43. // Miscellaneous functions
  44. CSimpleString GetFolderName( LPCITEMIDLIST pidl );
  45. LRESULT AddPathToComboBoxExOrListView( HWND hwndCombo, CDestinationData &Path, bool bComboBoxEx );
  46. void PopulateDestinationList(void);
  47. CDestinationData *GetCurrentDestinationFolder( bool bStore );
  48. bool ValidateFilename( LPCTSTR pszFilename );
  49. void DisplayProposedFilenames(void);
  50. void RestartFilenameInfoTimer(void);
  51. HWND ValidatePathAndFilename(void);
  52. bool StorePathAndFilename(void);
  53. bool ValidatePathname( LPCTSTR pszPath );
  54. void PopulateSaveAsTypeList( IWiaItem *pWiaItem );
  55. GUID *GetCurrentOutputFormat(void);
  56. void UpdateDynamicPaths( bool bSelectionChanged = false );
  57. CDestinationData::CNameData PrepareNameDecorationData( bool bUseCurrentSelection=false );
  58. // SHBrowseForFolder callback
  59. static int CALLBACK BrowseCallbackProc(HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData );
  60. private:
  61. LRESULT OnEventNotification( WPARAM, LPARAM );
  62. // WM_COMMAND handlers
  63. void OnBrowseDestination( WPARAM, LPARAM );
  64. void OnCreateTopicalDirectory( WPARAM, LPARAM );
  65. void OnAdvanced( WPARAM, LPARAM );
  66. void OnRootNameChange( WPARAM, LPARAM );
  67. // WM_NOTIFY handlers
  68. LRESULT OnWizBack( WPARAM, LPARAM );
  69. LRESULT OnWizNext( WPARAM, LPARAM );
  70. LRESULT OnSetActive( WPARAM, LPARAM );
  71. LRESULT OnDestinationEndEdit( WPARAM, LPARAM );
  72. LRESULT OnImageTypeDeleteItem( WPARAM, LPARAM );
  73. // Message handlers
  74. LRESULT OnInitDialog( WPARAM, LPARAM );
  75. LRESULT OnCommand( WPARAM, LPARAM );
  76. LRESULT OnNotify( WPARAM, LPARAM );
  77. LRESULT OnDestroy( WPARAM, LPARAM );
  78. LRESULT OnThreadNotification( WPARAM, LPARAM );
  79. public:
  80. static INT_PTR CALLBACK DialogProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
  81. };
  82. #endif __COMTRANS_H_INCLUDED