我想在嵌入式设备上进行乱画控制,这是我到目前为止所做的:
放置了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);
}
没有构建错误,应用程序正在运行。 但是没有任何东西可以吸引到墨水展示者身上。我做错了什么?