常用函数波形发生器的设计内容摘要:

cerDlg message handlers BOOL CFuncitonProducerDlg::OnInitDialog() { CDialog::OnInitDialog()。 // Add About... menu item to system menu. // IDM_ABOUTBOX must be in the system mand range. ASSERT((IDM_ABOUTBOX amp。 0xFFF0) == IDM_ABOUTBOX)。 ASSERT(IDM_ABOUTBOX 0xF000)。 CMenu* pSysMenu = GetSystemMenu(FALSE)。 if (pSysMenu != NULL) { CString strAboutMenu。 (IDS_ABOUTBOX)。 if (!()) { pSysMenuAppendMenu(MF_SEPARATOR)。 pSysMenuAppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu)。 } } // Set the icon for this dialog. The framework does this automatically // when the application39。 s main window is not a dialog SetIcon(m_hIcon, TRUE)。 // Set big icon SetIcon(m_hIcon, FALSE)。 // Set small icon // TODO: Add extra initialization here (1)。 ()。 (1)。 (请选择波形 )。 return TRUE。 // return TRUE unless you set the focus to a control } void CFuncitonProducerDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID amp。 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout。 ()。 } else { CDialog::OnSysCommand(nID, lParam)。 } } // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. void CFuncitonProducerDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this)。 // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) (), 0)。 // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON)。 int cyIcon = GetSystemMetrics(SM_CYICON)。 CRect rect。 GetClientRect(amp。 rect)。 int x = (() cxIcon + 1) / 2。 int y = (() cyIcon + 1) / 2。 // Draw the icon (x, y, m_hIcon)。 } else { CDialog::OnPaint()。 } //画 x轴 CClientDC initdc(this)。 (70,480)。 (70,310)。 (65,315)。 (70,310)。 (75,315)。 //画 y轴 (70,480)。 (750,480)。 (745,475)。 (750,480)。 (745,485)。 //标注 y轴 for(int i=1。 i=5。 i++) { (70,48030*i)。 (75,48030*i)。 } //标注 x轴 for(i=1。 i=。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。