// DN_sampleDlg.h : header file // #pragma once #include "video.h" #include "afxcmn.h" #include "afxwin.h" #include #include "MicroImage.h" #include "Form2.h" #include "CalImageDlg.h" class CStaticColor: public CStatic{ public: CStaticColor():CStatic(){} COLORREF clr; virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct){ CDC dc;dc.Attach(lpDrawItemStruct->hDC); dc.FillSolidRect(0,0,100,100,clr); dc.Detach(); } }; // CDN_sampleDlg dialog class CDN_sampleDlg : public CDialog { int mx,my,mw,mh;HDC hdc;HBITMAP hb; // Construction public: CDN_sampleDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data enum { IDD = IDD_DN_SAMPLE_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected: HICON m_hIcon; virtual BOOL PreTranslateMessage(MSG* pMsg); // Generated message map functions virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); virtual void OnCancel() override; afx_msg HCURSOR OnQueryDragIcon(); DECLARE_MESSAGE_MAP() afx_msg void SelectOneImg(); afx_msg void ChangeTab(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint point); afx_msg void OnDeleteOne(); afx_msg void OnSaveOne(); afx_msg void OnBtnMinimize(); //afx_msg void OnBtnMaximize(); void Test(); std::string Utf8ToAscii(const std::string& str); public: CVideo m_video; DECLARE_EVENTSINK_MAP() void MicroTouchPressedVideo(); CComboBox m_videoCodec; CComboBox m_audioCodec; CComboBox m_device; CStaticColor m_clr; CStatic m_capturelabel; CListBox m_listBox; CTabCtrl m_tab; std::vector m_ImgVec; CForm2 m_f1; CalImageDlg m_f2; uint m_ImgIndex; int m_nFontHeight; //字体的高度 CString m_ExePath; //可执行文件路径 };