⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drawtoolbar.h

📁 VC&Matlab混合编程实现无线电导航指示器
💻 H
字号:
// DrawToolBar.h: interface for the CDrawToolBar class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DRAWTOOLBAR_H__92C5E4E8_AEA5_41DF_8719_68F0422CC7CF__INCLUDED_)
#define AFX_DRAWTOOLBAR_H__92C5E4E8_AEA5_41DF_8719_68F0422CC7CF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//这个类继承了CToolBar
//加消息响应,把ToolBar的OnPaint()搞定,想怎么画就怎么画了哈。
//与CommonStatic类配合,CommonStatic类一是给ToolBar的父框架挂钩子,二是定义了其PaintProc!


typedef	void (*PAINTPROC)(CDC*pDC,CString strPaintInfo);

class CDrawToolBar : public CToolBar
{
protected:
		DECLARE_DYNCREATE(CDrawToolBar)


public:
	CWnd* GetFloatingParentWnd();
	void SetFloatingTitle(UINT IDfloatingTitle);
	void Paint();
	void SetPaintInfo(CString strInfo);
	void DrawBackGround(CDC *pDC);
	CDrawToolBar();
	CDrawToolBar(UINT IDbackGroundBitmap);
	void SetBackGroundBitmap(UINT IDbackGroundBitmap);
	virtual ~CDrawToolBar();
	void SetPaintProc(PAINTPROC paintProc);
	
protected:
	CString m_strPaintInfo;
    PAINTPROC m_paintProc;
	CBrush* m_pBackGroundBrush;
	UINT m_IDfloatingTitle;
	//{{AFX_MSG(CDrawToolBar)	
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMove(int x, int y);
	afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};

#endif // !defined(AFX_DRAWTOOLBAR_H__92C5E4E8_AEA5_41DF_8719_68F0422CC7CF__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -