Visual c++ 如何在Silverlight For Windows Embedded中的InkPresenter上书写?

Visual c++ 如何在Silverlight For Windows Embedded中的InkPresenter上书写?,visual-c++,silverlight-3.0,windows-embedded,windows-embedded-compact,Visual C++,Silverlight 3.0,Windows Embedded,Windows Embedded Compact,我想在嵌入式设备上做一个涂鸦式的控件,这就是我到目前为止所做的: 放置了InkPresenter控件(Home_Ink),以下是其事件: Home\u Ink\u MouseLeftButtonDown: m_pHome_Ink->CaptureMouse(retValue); pApplication->CreateObject(&s); pApplication->CreateObject(&pStylusPoints); pApplicat

我想在嵌入式设备上做一个涂鸦式的控件,这就是我到目前为止所做的:

放置了InkPresenter控件(Home_Ink),以下是其事件:

Home\u Ink\u 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);
  s=NULL;
  m_pHome_Ink->ReleaseMouseCapture();
  if(s!=NULL)
  {
        s->SetStylusPoints(pArgs->pStylusPoints);
        pStrokes->Add(s,NULL);
  }
Home\u Ink\u MouseLeftButtonUp:

  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);
  s=NULL;
  m_pHome_Ink->ReleaseMouseCapture();
  if(s!=NULL)
  {
        s->SetStylusPoints(pArgs->pStylusPoints);
        pStrokes->Add(s,NULL);
  }
主页\u墨水\u鼠标移动:

  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);
  s=NULL;
  m_pHome_Ink->ReleaseMouseCapture();
  if(s!=NULL)
  {
        s->SetStylusPoints(pArgs->pStylusPoints);
        pStrokes->Add(s,NULL);
  }
没有生成错误,应用程序正在运行。 但是没有任何东西被inkpresenter吸引。我做错了什么