Windows API function (4) in VCL: adjustwindowrectex

Source: Internet
Author: User
Adjustwindowrectex is used in forms and dbctrls units.

The edge size that adjustwindowrectex can obtain based on the window style.

Test:
VaR R: trect; begin setrect (R, 0, 0, 0, 0); {This rectangle is not a global variable and needs to be blank initially} adjustwindowrectex (r, {return value of the rectangle structure bearing} getwindowlong (handle, gwl_style), {window style} false, {with or without menus} getwindowlong (handle, gwl_exstyle) {window extended style }); showmessagefmt ('% d, % d', [R. left, R. top, R. right, R. bottom]); {result:-4,-30, 4, 4} {indicates that the window width is 4, and the title bar height is 30} {if a menu is specified, the result is: -4,-50, 4, 4; indicates that the menu height is 20} end;

 
Related Article

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.