Usage of wm_nclbuttonup

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.