如何隐藏我们wince系统中的鼠标指针?当然通过在应用程序中通过ShowCursor(FALSE)或SetCursorPos将鼠标指针隐藏(没试过,应该可以)。但是用这种方法在应用程序启动前的一段时间,鼠标指针还是会冒出来。还有一种方法可以解决这个问题,就是在定制系统时将鼠标组件去掉,不过这种方法好像会导致获取触摸坐标函数的返回值不正确。

一种更好的方法是在显示驱动的MovePointer函数中将下面一段屏蔽掉:

if (xPosition != -1 || yPosition != -1)
{
m_CursorRect.left = xPosition - m_CursorHotspot.x;
m_CursorRect.right = m_CursorRect.left + m_CursorSize.x;
m_CursorRect.top = yPosition - m_CursorHotspot.y;
m_CursorRect.bottom = m_CursorRect.top + m_CursorSize.y;
CursorOn();
}

PB帮助文档中有这么一段话:

This method executes from applications either to move the hot spot of the cursor to a specific screen location or to hide the cursor.

If the platform uses a stylus or a shell without a pointer, no cursor is necessary, and the GPE pointer methods can return S_OK without doing any work.




如何隐藏我们wince系统中的鼠标指针?当然通过在应用程序中通过ShowCursor(FALSE)或SetCursorPos将鼠标指针隐藏(没试过,应该可以)。但是用这种方法在应用程序启动前的一段时间,鼠标指针还是会冒出来。还有一种方法可以解决这个问题,就是在定制系统时将鼠标组件去掉,不过这种方法好像会导致获取触摸坐标函数的返回值不正确。

一种更好的方法是在显示驱动的MovePointer函数中将下面一段屏蔽掉:

if (xPosition != -1 || yPosition != -1)
{
m_CursorRect.left = xPosition - m_CursorHotspot.x;
m_CursorRect.right = m_CursorRect.left + m_CursorSize.x;
m_CursorRect.top = yPosition - m_CursorHotspot.y;
m_CursorRect.bottom = m_CursorRect.top + m_CursorSize.y;
CursorOn();
}

PB帮助文档中有这么一段话:

This method executes from applications either to move the hot spot of the cursor to a specific screen location or to hide the cursor.

If the platform uses a stylus or a shell without a pointer, no cursor is necessary, and the GPE pointer methods can return S_OK without doing any work.