Recently, a project was created to achieve this effect by dragging the title bar. Then, when the left mouse button is released and lifted, the message wm_nclbuttonup was found, try it. No. You have to double-click the title bar to send a wm_nclbuttonup message. You can forge a wm_nclbuttonup message. However, if so, you cannot drag the window through the title bar. Therefore, after checking the relevant information, you can solve the problem by using the following code:
Void cxxxdialog: onsyscommand (uint NID, lparam) {// todo: add the message processing program code and/or call the default cdialog: onsyscommand (NID, lparam ); if (NID & 0xfff0) = SC _move) postmessage (wm_nclbuttonup, NID, lparam );}
Then respond to a wm_syscommand message and add the preceding statement. Then, the wm_nclbuttonup message can be processed normally.