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

📄 microwavedlg.h

📁 电磁场的演示程序
💻 H
字号:
// MicroWaveDlg.h : header file
//

#if !defined(AFX_MicroWaveDLG_H__9AD315E9_7B11_4FC2_832E_7D4BA3F44E2A__INCLUDED_)
#define AFX_MicroWaveDLG_H__9AD315E9_7B11_4FC2_832E_7D4BA3F44E2A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TitleBox.h"
#include "Graph.h"

#define PI          3.1415926			
#define BKRGB		RGB(0,0,0)
#define	LINERGB		RGB(255,255,0)
#define OFFSET		200
#define SCALE      1000
#define ID_TIME_1 101
#define ID_TIME_2 102
#define ID_TIME_3 103
#define ID_TIME_4 104
#define ID_TIME_5 105
#define ID_TIME_6 106
#define ID_TIME_7 107
#define ID_TIME_8 108
#define ID_TIME_9 109
#define ID_TIME_10 110
#define ID_TIME_11 111
#define ID_TIME_12 112
#define	ID_TIME_14 113
#define TIMER_NUM   13

#define TIMER_AUTO  700

#define BOX1_NUMBER 21
#define BOX2_NUMBER 12


/////////////////////////////////////////////////////////////////////////////
// CMicroWaveDlg dialog

class CMicroWaveDlg : public CDialog
{
// Construction
public:
	float b_D;
	float b_C;
	float l_C;
	float l_D;
	float d_D;
	float d_C;
	float Calc_Angel(CPoint point_STR,CPoint point_END);
	void draw_text(CString str,CPoint pos,COLORREF pen_color=RGB(255,0,0));
	void draw_graph(CGraph *graph);
	void draw_gamma(float gamma,COLORREF pen_rgb=RGB(255,255,0),int pen_wid=1);
	float gam_u_A;
	float gam_v_A;
	float gamma_A;
	float r_C;
	float x_C;
	float r_D;
	float x_D;
	float gam_u_C;
	float gam_v_C;
	float gamma_C;
	float gam_u_D;
	float gam_v_D;
	float gamma_D;

	void draw_line(CPoint EndPoint,COLORREF color=RGB(255,255,0),CPoint StartPoint=CPoint(0,0));
	float YL_X;
	void initControlPlane(void);
	void InvalidateControlPlane(void);
	void ShowControlPlane2(int nShow);
	void ShowControlPlane1(int nShow);
	void SetControlPos2();
	void SetControlPos1();
	void CalculateControlPos2();
	void CalculateControlPos1();


	bool b_Mark2;
	bool b_Mark1;
	float interval;
	float step;
	float angle;
	unsigned int time;
	
	int m_Box1ID[BOX1_NUMBER];			//面板1中各控件ID号
	CPoint m_ControlPt1[BOX1_NUMBER];	//面板1中各控件位置

	int m_Box2ID[BOX2_NUMBER];			//面板2中各控件ID号
	CPoint m_ControlPt2[BOX2_NUMBER];	//面板2中各控件位置

	void draw_chart(void);

	void drawr(float r,COLORREF pen_rgb=RGB(255,255,0),int pen_wid=1);
	void drawx(float x,COLORREF pen_rgb=RGB(255,255,0),int pen_wid=1);
	CMicroWaveDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMicroWaveDlg)
	enum { IDD = IDD_MicroWave_DIALOG };
	CTitleBox	m_Title2;
	CTitleBox	m_Title1;
	float	m_Edit_R;
	float	m_Edit_X;
	float	m_ZL_R;
	float	m_ZL_X;
	float	m_Z0;
	CString	m_Result;
	int		m_RADIO;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMicroWaveDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMicroWaveDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnRadio1();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnRadio2();
	afx_msg void OnRadio10();
	afx_msg void OnRadio11();
	afx_msg void OnRadio12();
	afx_msg void OnRadio13();
	afx_msg void OnRadio3();
	afx_msg void OnRadio4();
	afx_msg void OnRadio5();
	afx_msg void OnRadio6();
	afx_msg void OnRadio7();
	afx_msg void OnRadio8();
	afx_msg void OnRadio9();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnButton1();
	afx_msg void OnRadio14();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnClose();
	afx_msg void OnSecond();
	afx_msg void OnFirst();
	afx_msg void OnStep();
	afx_msg void OnStop();
	afx_msg void OnAuto();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	float YL_R;
	int Step_Num;
	CPtrArray m_Ptr_Array;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MicroWaveDLG_H__9AD315E9_7B11_4FC2_832E_7D4BA3F44E2A__INCLUDED_)

⌨️ 快捷键说明

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