#pragma once #include "BlButton.h" #define ID_MSG_TOOLBAR_BTN_CLICKED WM_USER + 20368 // CTopToolbar ¶Ô»°¿ò class CTopToolbar : public CDialogEx { DECLARE_DYNAMIC(CTopToolbar) public: CTopToolbar(CWnd* pParent = NULL); // ±ê×¼¹¹Ô캯Êý virtual ~CTopToolbar(); public: CWnd* GetBtn(UINT nId); void SetOperatorBtnText(const char* pszText); HMENU GetOperatorMenu(); private: void Resize(); void InitBtn(CBlButton& btn, const char* pszIcon1, const char* pszIcon2); private: COLORREF m_crBkgnd; HBRUSH m_hbrBkgnd; private: CBlButton m_btnRun; CBlButton m_btnRunBatch; CBlButton m_btnRunCt; CBlButton m_btnStop; CBlButton m_btnCJobs; CBlButton m_btnAlarm; CBlButton m_btnSettings; CBlButton m_btnPortConfig; CBlButton m_btnCassette; CBlButton m_btnRobot; CBlButton m_btnOperator; // ¶Ô»°¿òÊý¾Ý #ifdef AFX_DESIGN_TIME enum { IDD = IDD_TOP_TOOLBAR }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV Ö§³Ö DECLARE_MESSAGE_MAP() public: virtual BOOL OnInitDialog(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); afx_msg void OnDestroy(); afx_msg void OnSize(UINT nType, int cx, int cy); virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); afx_msg void OnButtonOperatorMenuClicked(NMHDR* pNMHDR, LRESULT* pResult); virtual BOOL PreTranslateMessage(MSG* pMsg); };