问一下各位在SDK编程中如何实现控件暂时不重绘,代码执行完后恢复重绘,和鼠标如可变漏斗的那种等待情况,需要SDK的实现方法,不要MFC的
解决方案 »
- 关于debug errorDamage before normal block.doc
- hostent内存 何时释放?
- 打印字体的大小如何改变??
- 为什么我的VC++6.0找不到AllowSetForegroundWindow()?
- 救命啊!请问如何用VC编程获取局域网上其他机器发出的http请求?
- 我的VC6。0创天版的没有打包程序,重新安装能出现么?十万火急
- printf("")与cout<< 混用的问题
- 无盘站能做WIN2000SERVER的终端吗?
- OpenGL和DirectX是什么关系?
- Visual Studio中的Macro功能不能使用了, 请问是什么原因
- 求助大侠:怎样控制打印机按黑白两色打印还是彩色打印?
- 求教事件模型的一些细节问题
IDC_ARROW Standard arrow
IDC_CROSS Crosshair
IDC_HAND Windows 98/Me, Windows 2000/XP: Hand
IDC_HELP Arrow and question
IDC_IBEAM I-beam
IDC_ICON Obsolete for applications ed version 4.0 or later.
IDC_NO Slashed circle
IDC_SIZE Obsolete for applications ed version 4.0 or later. Use IDC_SIZEALL.
IDC_SIZEALL Four-pointed arrow pointing north, south, east, and west
IDC_SIZENESW Double-pointed arrow pointing northeast and southwest
IDC_SIZENS Double-pointed arrow pointing north and south
IDC_SIZENWSE Double-pointed arrow pointing northwest and southeast
IDC_SIZEWE Double-pointed arrow pointing west and east
IDC_UPARROW Vertical arrow
IDC_WAIT Hourglass
The system automatically displays the class cursor (the cursor associated with the window to which the cursor is pointing). You can assign a class cursor while registering a window class. The following example illustrates this by assigning a cursor handle to the hCursor member of the WNDCLASS structure identified by the wc parameter. WNDCLASS wc;
// Fill the window class structure with parameters that
// describe the main window.
wc.style = NULL; // class style(s)
wc.lpfnWndProc = (WNDPROC) MainWndProc; // window procedure
wc.cbClsExtra = 0; // no per-class extra data
wc.cbWndExtra = 0; // no per-window extra data
wc.hInstance = hinst; // application that owns the class
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); // class icon
wc.hCursor = LoadCursor(hinst, MAKEINTRESOURCE(230)); // class cursor
wc.hbrBackground = GetStockObject(WHITE_BRUSH); // class background
wc.lpszMenuName = "GenericMenu"; // class menu
wc.lpszClassName = "GenericWClass" // class name
// Register the window class.
return RegisterClass(&wc);
When the window class is registered, the cursor identified by 230 in the application's resource-definition file is the default cursor for all windows based on the class. Your application can change the design of the cursor by using the SetCursor function and specifying a different cursor handle. However, when the cursor moves, the system redraws the class cursor at the new location. To prevent the class cursor from being redrawn, you must process the WM_SETCURSOR message. Each time the cursor moves and mouse input is not captured, the system sends this message to the window in which the cursor is moving. You can specify different cursors for different conditions while processing WM_SETCURSOR. For example, the following example shows how to display the hCurs3 cursor whenever the cursor moves over the icon of a minimized application. case WM_SETCURSOR:
// If the window is minimized, draw the hCurs3 cursor.
// If the window is not minimized, draw the default
// cursor (class cursor).
if (IsIconic(hwnd))
{
SetCursor(hCurs3);
break;
}
When the window is not minimized, the system displays the class cursor. You can replace a class cursor by using the SetClassLong function. This function changes the default window settings for all windows of a specified class. The following example replaces the existing class cursor with the hCurs2 cursor. // Change the cursor for window class represented by hwnd.
SetClassLong(hwnd, // window handle
GCL_HCURSOR, // change cursor
(LONG) hCurs2); // new cursor
msdn上的例子,你去看看吧
试试