C++ RemoteDesktop 滑鼠顯示問題
劉惪宇 2019-08-15 05:31:31 各位大大,小弟撰写远端连线的程式,现行想要在Viewer端显示Client端的滑鼠游标,于是使用了DrawIconEx的函数来显示滑鼠游标
DrawIconEx(
m_hmemdc, // handle to device context
m_cursorpos.left - m_bmrect.left,
m_cursorpos.top - m_bmrect.top,
m_hcursor, // handle to icon to draw
0, 0, // width of the icon
0, // index of frame in animated cursor
NULL, // handle to background brush
DI_NORMAL // icon-drawing flags
);
,但是因为画面刷新所以无法看到滑鼠游标。画面刷新是用bitblt的方式
BOOL blitok = BitBlt(
m_hmemdc, // handle to device context
rect.left - m_bmrect.left,
rect.top - m_bmrect.top,
rect.right - rect.left,
rect.bottom - rect.top,
m_hrootdc, //handle from source context
rect.left, rect.top,
SRCCOPY | CAPTUREBLT)
,如果说将画面刷新截断成两个部份的话就能够看到滑鼠游标(虽然是闪烁的状态),但会造成Viewer端画面看起来是有两半显示的状况。
想请问说有什么方法能够让我的滑鼠游标显示在最上湣或是有什么其他方法能够显示游标???
麻烦各位大大帮帮忙!!