Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个带有红色位图的插入符号,如下所示:
代码:
HBITMAP hbm = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP2)); ::CreateCaret(hWnd_, hbm, 0, 0); ::ShowCaret(hWnd_);
但插入符号原来是
我的代码有什么问题,还是 CreateCaret 只是移动位图中的颜色位?
根据我的测试,Windows 反转位图位。因此,红色(0xffff0000)变为青色(0xff00ffff);黑变白,白变黑。