16,465
社区成员
发帖
与我相关
我的任务
分享
void CGxcwView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
GetClientRect(m_ClientRect);
if(m_WaveWnd1.Create(WS_BORDER |WS_CHILD|WS_VISIBLE,m_ClientRect,this,0)==false)
TRACE("Create CWaveWnd Faulse\n");
m_WaveWnd1.SetMaxPlotNum(800);
if(m_WaveWnd2.Create(WS_BORDER |WS_CHILD|WS_VISIBLE,m_ClientRect,this,0)==false)
TRACE("Create CWaveWnd2 Faulse\n");
m_WaveWnd1.SetWindowPos(&wndBottom ,m_ClientRect.left,m_ClientRect.top,
(m_ClientRect.right-m_ClientRect.left),(m_ClientRect.bottom-m_ClientRect.top)/2,SWP_DRAWFRAME );//这行在这个函数里运行没有问题
m_WaveWnd2.SetWindowPos(&wndBottom ,m_ClientRect.left,
m_ClientRect.top+(m_ClientRect.bottom-m_ClientRect.top)/2,(m_ClientRect.right-m_ClientRect.left),
(m_ClientRect.bottom-m_ClientRect.top)/2-15,SWP_DRAWFRAME );
m_WaveWnd2.SetMaxPlotNum(800);
}
void CGxcwView::OnSize(UINT nType, int cx, int cy)
{
CListView::OnSize(nType, cx, cy);
GetClientRect(m_ClientRect);
m_WaveWnd1.SetWindowPos(&wndBottom ,m_ClientRect.left,m_ClientRect.top,
(m_ClientRect.right-m_ClientRect.left),(m_ClientRect.bottom-m_ClientRect.top)/2,SWP_DRAWFRAME );//在这行出错
m_WaveWnd2.SetWindowPos(&wndBottom ,m_ClientRect.left,
m_ClientRect.top+(m_ClientRect.bottom-m_ClientRect.top)/2,(m_ClientRect.right-m_ClientRect.left),
(m_ClientRect.bottom-m_ClientRect.top)/2,SWP_DRAWFRAME );
// TODO: Add your message handler code here
}