NSIs Untitled window Movement

Source: Internet
Author: User
NSIs Untitled window Movement

After the previous few, we loaded the background image, removed the original borders, controls, etc., and you found that when the mouse clicked on the window title bar, the window cannot be moved. Next, look at how our window implements the window movement. The subtext of the untitled move is to pass the message that was originally passed to the title bar to the title bar through your defined element callback, so just add the resources you added and the callback function to pass the message. Here is done by winproc this plugin.
Here we define a function callback to implement the window move operation

Function onguicallback
 ${if} $MSG = ${wm_lbuttondown}
 SendMessage $HWNDPARENT ${wm_nclbuttondown} ${htcaption } $
 ${endif}
 functionend
 ; The above is a callback function that determines the down event of the left mouse button and passes the message to the title bar.
Getfunctionaddress $ onguicallback
wndproc::oncallback $BGImage; handles borderless form movement; the
above is the current $bgimage as the callback body, When the user left click on the $bgimage, the message is passed to the form title bar, to achieve a borderless movement.
Let's look at the effect diagram:

Note: In the source code, the beginning of the section defines two variables:

var MSG, var Dialog.
The MSG variable is used in the move callback function, the dialog variable is not explicitly used, and if the $dialog variable is not declared, controlling the display of the graphic in the button's click event is not valid. (This is a personal practice, not an official explanation)

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.