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.

168 lines
4.7 KiB

  1. // WIATestView.h : interface of the CWIATestView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_WIATESTVIEW_H__48214BAE_E863_11D2_ABDA_009027226441__INCLUDED_)
  5. #define AFX_WIATESTVIEW_H__48214BAE_E863_11D2_ABDA_009027226441__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "cdib.h"
  10. #include "WIATestDoc.h"
  11. #include "WIATestUI.h"
  12. #include "eventcallback.h"
  13. #include "wiapreview.h"
  14. #ifndef StiDeviceTypeStreamingVideo
  15. #define StiDeviceTypeStreamingVideo 3
  16. #endif
  17. //
  18. // Operation threads section
  19. //
  20. ULONG _stdcall AddDeviceThread(LPVOID pParam);
  21. class CWIATestView : public CFormView
  22. {
  23. protected: // create from serialization only
  24. CWIATestView();
  25. DECLARE_DYNCREATE(CWIATestView)
  26. CWIA m_WIA;
  27. //CTypedPtrList<CPtrList, WIAITEMTREENODE*> m_ActiveTreeList;
  28. IWiaDevMgr* m_pIWiaDevMgr;
  29. public:
  30. //{{AFX_DATA(CWIATestView)
  31. enum { IDD = IDD_WIATEST_FORM };
  32. CButton m_PlayAudioButton;
  33. CWIATymedComboBox m_TymedComboBox;
  34. CStatic m_ThumbnailImage;
  35. CStatic m_PreviewFrame;
  36. CWIAPropListCtrl m_ItemPropertyListControl;
  37. CWIADeviceComboBox m_DeviceListComboBox;
  38. CWIATreeCtrl m_ItemTree;
  39. CWIAClipboardFormatComboBox m_ClipboardFormatComboBox;
  40. CString m_FileName;
  41. CString m_GUIDDisplay;
  42. CString m_AudioFileName;
  43. //}}AFX_DATA
  44. // Attributes
  45. public:
  46. CWIATestDoc* GetDocument();
  47. // Operations
  48. public:
  49. // Overrides
  50. // ClassWizard generated virtual function overrides
  51. //{{AFX_VIRTUAL(CWIATestView)
  52. public:
  53. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  54. protected:
  55. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  56. virtual void OnInitialUpdate(); // called first time after construct
  57. //}}AFX_VIRTUAL
  58. // Implementation
  59. public:
  60. BOOL ItemHasAudio(IWiaItem* pIWiaItem);
  61. void DisplayItemThumbnail(IWiaItem* pIWiaItem);
  62. void ResizeControls(int dx,int dy);
  63. void UpdateUI();
  64. //
  65. // WIA UI specific
  66. //
  67. BOOL DoDefaultUIInit();
  68. BOOL DoCmdLineUIInit(CString CmdLine);
  69. //
  70. // DIB display
  71. //
  72. CDib* m_pDIB;
  73. void DisplayImage();
  74. HBITMAP m_hBitmap;
  75. PBYTE m_pThumbNail;
  76. //
  77. // WIA helper functions
  78. //
  79. HRESULT EnumerateWIADevices();
  80. void RefreshDeviceList();
  81. void RegisterForAllEventsByInterface();
  82. void UnRegisterForAllEventsByInterface();
  83. //
  84. // member variables
  85. //
  86. CEventCallback* m_pConnectEventCB; // connect callback
  87. CEventCallback* m_pDisConnectEventCB; // disconnect callback
  88. CWIAPreview* m_pPreviewWindow; // image preview window
  89. CWIAPreview* m_pFullPreviewWindow; // image preview window (FULL)
  90. int m_PaintMode; // Paint mode (PAINT_TOFIT, PAINT_ACTUAL)
  91. BOOL m_bThumbnailMode; // Thumbnail mode ON/OFF (camera only)
  92. //
  93. // destruction
  94. //
  95. virtual ~CWIATestView();
  96. #ifdef _DEBUG
  97. virtual void AssertValid() const;
  98. virtual void Dump(CDumpContext& dc) const;
  99. #endif
  100. protected:
  101. // Generated message map functions
  102. protected:
  103. //{{AFX_MSG(CWIATestView)
  104. afx_msg void OnSelchangedDeviceItemTree(NMHDR* pNMHDR, LRESULT* pResult);
  105. afx_msg void OnSelchangeDevicelistCombo();
  106. afx_msg void OnDblclkListItemprop(NMHDR* pNMHDR, LRESULT* pResult);
  107. afx_msg void OnGetimagedlg();
  108. afx_msg void OnIdtgetbanded();
  109. afx_msg void OnWiadata();
  110. afx_msg void OnAdddevice();
  111. afx_msg void OnRefresh();
  112. afx_msg void OnViewTransferToolbar();
  113. afx_msg void OnExecutecommand();
  114. afx_msg void OnDumpdrvitemInfo();
  115. afx_msg void OnDumpappitemInfo();
  116. afx_msg void OnPaint();
  117. afx_msg void OnPaintmodeCheckbox();
  118. afx_msg void OnResetsti();
  119. afx_msg void OnFullpreview();
  120. afx_msg void OnThumbnailmode();
  121. afx_msg void OnDeleteitem();
  122. afx_msg void OnSelchangeTymedCombobox();
  123. afx_msg void OnSelchangeClipboardFormatCombobox();
  124. afx_msg void OnUpdateViewTransferToolbar(CCmdUI* pCmdUI);
  125. afx_msg void OnPlayaudioButton();
  126. afx_msg void OnGetrootitemtest();
  127. afx_msg void OnReenumitems();
  128. afx_msg void OnSavepropstream();
  129. afx_msg void OnLoadpropstream();
  130. afx_msg void OnGetSetPropstreamTest();
  131. afx_msg void OnAnalyzeItem();
  132. afx_msg void OnCreateChildItem();
  133. //}}AFX_MSG
  134. DECLARE_MESSAGE_MAP()
  135. };
  136. #ifndef _DEBUG // debug version in WIATestView.cpp
  137. inline CWIATestDoc* CWIATestView::GetDocument()
  138. { return (CWIATestDoc*)m_pDocument; }
  139. #endif
  140. /////////////////////////////////////////////////////////////////////////////
  141. //{{AFX_INSERT_LOCATION}}
  142. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  143. #endif // !defined(AFX_WIATESTVIEW_H__48214BAE_E863_11D2_ABDA_009027226441__INCLUDED_)