[问题] MFC RealTime Lib的参数设定?

楼主: bluestar8783 (蓝星)   2015-06-03 22:43:51
因为需要在MFC Dialog-Base application上绘制Realtime的Line Chart
所以在网络上搜寻到一个free的library/demo source code
demo applcation是采用Doc/View的架构
在OnInitialUpdate()时候下
GetClientRect(Rect);
m_Plot.Create(WS_CHILD|WS_VISIBLE,Rect,this,12000);
我把它移植到Dialog上,却会出现问题
而底下是Create的一部份code
我有trace到CWnd::Create、ScreenToClient和ComputeRects中的第1行会失败
但却不知道怎么修改,或是参数如何改变
请各位高手/大大指导一下
鞭小力点
BOOL clPlot::Create(DWORD dwstyle, CRect &rect, CWnd *pParent, UINT id)
{
DWORD style = dwstyle & (~WS_BORDER);
if(dwstyle & WS_BORDER)
m_bctlBorder=TRUE;
else
m_bctlBorder=FALSE;
if(!CWnd::Create(NULL, "", style, rect, pParent, id, NULL))
return FALSE;
m_ctlRect = rect;
pParent->ClientToScreen(m_ctlRect);
ScreenToClient(m_ctlRect);
ComputeRects(TRUE);
return TRUE;
}
void clPlot::ComputeRects(BOOL bInitialization)
{
CClientDC dc(this);
...
}

Links booklink

Contact Us: admin [ a t ] ucptt.com