我想在嵌入式设备上做一个涂鸦式的控制,这就是我到目前为止所做的:
放置了一个 InkPresenter 控件 (Home_Ink),这些是它的事件:
Home_Ink_MouseLeftButtonDown:
m_pHome_Ink->CaptureMouse(retValue);
pApplication->CreateObject(&s);
pApplication->CreateObject(&pStylusPoints);
pApplication->CreateObject(&pDrawingAttributes);
s->SetStylusPoints(pArgs->pStylusPoints);
pDrawingAttributes->SetHeight(pencilWidth);
pDrawingAttributes->SetWidth(pencilWidth);
pDrawingAttributes->SetColor(pencilColor);
s->SetDrawingAttributes(pDrawingAttributes);
m_pHome_Ink->GetStrokes(&pStrokes);
pStrokes->Add(s,NULL);
Home_Ink_MouseLeftButtonUp:
s=NULL;
m_pHome_Ink->ReleaseMouseCapture();
Home_Ink_MouseMove :
if(s!=NULL)
{
s->SetStylusPoints(pArgs->pStylusPoints);
pStrokes->Add(s,NULL);
}
没有构建错误并且应用程序正在运行。但是在 inkpresenter 上什么也没有画出来。我究竟做错了什么??