Today I checked a lot of documents about DirectInput, and even saw DirectInput Sample in DirectX 9.0 SDK. Their initialization is basically the same, from DirectInput's initialization until DirectInputDevice's Acquire. However, the ACQUIRE of M $ is not judged back, so it will return, exit the initialization function regardless of whether acquire succeeds. And many other online examples are in the same size, and I am writing almost. Finally, I will see if the Sword 2 will have the same problem. Sure enough, I immediately move the focus to other windows after starting with the Holy Sword 2 window mode, and the Sword 2 pops up the mouse to get the dialog box. Haha ~~ compares the code of their getDeviceState, basically almost dealing with Dierr_LostInput this error. Later I think, since the initialization is unsuccessful, it is not important, as long as the window is updated in the device status, the window will have a focus, and then in the getDeviceState, add a Dierr_notacquire error, then this problem is perfect. . Initialization, you can do not write Device's Acquire. Directly in the refresh state process: hresulthr = lpdidmouse-> getDeviceState (...); if (hr == dierr_lostinput | dierr_notacquire) {hr = lpdidmouse-> acquire (); if (Failed (HR)) Return HR;} Return S_OK Next, you can follow the class management class. After watching Tsonline, it was found that it was refreshed with the mouse separate thread. So when it drags the window moving, a small flower screen will appear, and that bug has not been processed. An article refers to this problem, its solution is to change a flash in the screen background, notify the mouse thread to replicate the new local background data. In fact, is it so troublesome, is it better than the full screen refresh? Although the mouse is likely to jump, I still like full screen brush. Second, TSONLINE When the mouse moves to the title bar, the system pointer will appear, and SWORD2 is not. Of course, I didn't do it. Maybe because the title bar is also within the window range. I don't know how just is limited to the area of redraw. Third, TSONLINE When the mouse moves to the bottom of the window, the pointer is outside the form, not only limited to the redrack area. These points I got 1 conclusion: it used the system .ani standard mouse file. Um ... In fact, it does have such a file in its directory, and there is BMP. But I think it is more like an ANI.