如何在C++应用程序中设置"Select Precision"光标?
How do I set the "Select Precision" cursor in a C++ application?
我需要以某种方式将光标设置为C++应用程序的"选择精度"指针(水平和垂直交叉(。
有谁知道如何使用 WinApi 协议集成它?
初始化代码中的某个地方:
HCURSOR precision_cursor = LoadCursor( NULL, IDC_CROSS );
和窗口程序:
LRESULT CALLBACK YourWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
switch ( msg )
{
case WM_SETCURSOR:
// If you omit test below, you will change cursor also for scrollbars, frames, etc.
if ( LOWORD( lparam ) == HTCLIENT )
{
SetCursor( precision_cursor );
return TRUE;
}
break;
}
// This will also handle cursor for scrollbars and frames.
return DefWindowProc( hwnd, msg, wparam, lparam );
}
相关文章:
- SQLite3 在 c++ 中输出 SELECT 上的空列表
- 如何在 sys/select.h 中正确使用
- 获取具有字段名称的 SELECT 字段类型,并带有 MariaDB C++连接器
- 在 c++ 中使用 cout.precision() 的奇怪输出
- UDP 套接字 select() 在某些情况下无延迟(超时)返回 1
- Winsock2 select():同一个套接字上可能有多个事件吗?
- Winsock2 select() 返回 WSAEINVAL(错误 10022)
- 将 select() 与非基于文件描述符的输入一起使用
- Winsock2 select() 函数:传递 {0, 0} 作为超时参数
- 为什么"possible lack of precision"不是编译器错误?
- 如何在C++应用程序中设置"Select Precision"光标?
- C++11 中对超载'ref(Select::Expressions::Code&)'的调用模棱两可
- 使用 select() 管理多个套接字
- 如何应用注册表模式使"select class depend on input"遵守开放封闭原则?
- 使用 Select 多路复用未命名的管道和其他文件描述符
- 为什么在使用 select() 时连接到带有第二个套接字的服务器"break"第一次连接?
- 为什么 cout.precision() 会提高浮点精度?
- read() 在 select() 阻塞之后,当从生成的进程从管道读取时
- win32 select()报告插入()套接字上的例外;wsagetlasterror()= 0
- 使用SEND()之前,请使用Select()检查套接字