我是想通过MFC做一个波形显示的界面,通过Picture Control控件显示波形,刚开始不知怎么改变这个窗口的大小
BOOL CMFC_Example1Dlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// TODO: Add extra initialization here
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE);// Set big icon
SetIcon(m_hIcon, FALSE);// Set small icon
CRect rect;
GetDlgItem(IDC_WAVE_DRAW)->GetWindowRect(&rect); //IDC_WAVE_DRAW为Picture Control的ID
ScreenToClient(&rect);
GetDlgItem(IDC_WAVE_DRAW)->MoveWindow(rect.left, rect.top, 800, 450, true); //固定Picture Control控件的大小
return TRUE; // return TRUE unless you set the focus to a control
}
本文介绍如何使用MFC及PictureControl控件实现波形显示界面,并提供了调整控件大小的具体代码实例。

9387


被折叠的 条评论
为什么被折叠?



