Winapi: setwindowpos-change the position and status of the window

Source: Internet
Author: User
// Declaration: setwindowpos (hwnd: hwnd; {window handle} hwndinsertafter: hwnd; {window Z sequence} X, Y: integer; {location} CX, Cy: integer; {size} uflags: uint {Option}): bool; // optional value of hwndinsertafter parameter: hwnd_top = 0; {before} hwnd_bottom = 1; {behind} hwnd_topmost = hwnd (-1); {front, front of any top window} hwnd_notopmost = hwnd (-2); {front, located behind other top windows} // optional value of uflags parameter: swp_nosize = 1; {ignore CX, Cy, keep size} swp_nomove = 2; {ignore x, y, do not change location} swp_nozorder = 4; {ignore hwndinsertafter and keep Z order} swp_noredraw = 8; {do not redraw} swp_noactivate = $10; {do not activate} swp_framechanged = $20; {force send wm_nccalcsize message. Generally, this message is sent only when it is changed.} swp_showwindow = $40; {display window} swp_hidewindow = $80; {hide window} swp_nocopybits = $100; {discard customer zone} swp_noownerzorder = $200; {ignore hwndinsertafter and do not change the owner of the Z sequence} swp_nosendchanging = $400; {do not send the wm_windowposchanging message} swp_drawframe = swp_frame; {draw border} swp_noreposition = swp_noownerzorder; {} swp_defererase = $2000; {prevent wm_syncpaint message generation} swp_asyncwindowpos = $4000; {if the calling process does not have a window, the system will send requests to threads with Windows}
 
   
 // Example: Procedure tform1.button1click (Sender: tobject); begin setwindowpos (handle, hwnd_topmost, 100,200, swp_showwindow); end;
  
   
 

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.