[問題] 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