WM_QUERYDRAGICON到底是什么作用?msdn中看不太懂

解决方案 »

  1.   

    在Windows中拖动一个没有设置图标的窗口的时候,系统就会向该窗口发送WM_QUERYDRAGICON消息,要求返回一个图标句柄,用于拖动过程中显示。
      

  2.   

    The WM_QUERYDRAGICON message is sent to a minimized (iconic) window. The window is about to be dragged by the user but does not have an icon defined for its class. An application can return a handle to an icon or cursor. The system displays this cursor or icon while the user drags the icon.A window receives this message through its WindowProc function. When the user drags the icon of a window without a class icon, the system replaces the icon with a default cursor. If the application requires a different cursor to be displayed during dragging, it must return a handle to the cursor or icon compatible with the display driver's resolution. If an application returns a handle to a color cursor or icon, the system converts the cursor or icon to black and white. The application can call the LoadCursor or LoadIcon function to load a cursor or icon from the resources in its executable (.exe) file and to retrieve this handle.If a dialog box procedure handles this message, it should cast the desired return value to a BOOL and return the value directly. The DWL_MSGRESULT value set by the SetWindowLong function is ignored.我觉得msdn说得很清楚了啊。