Windows API-----Top Level window

Source: Internet
Author: User

Original address:

http://blog.163.com/cumt_xl/blog/static/19071504420136911838683/

Q:What is a top-level window?


a: a top-level window is a window, which is not child, i.e. it had not ws_child style set.

Notes

    • Unlike the child Windows, a top-level window can be displayed anywhere on the screen;
    • Many definitions state, a top-level window is "A window This has no parent";
      That's correct but can leads in a confusion:many people think the every window which is created passing a valid hWnd Parent in CreateWindow (Ex) "had a parent" then, according to the definition it was not top-level;
      In fact hwndparent is either a handle to parent or owner window;
      If hwndparent is a valid window handle and Ws_child style are not set, then we have a top-level owned window ;
    • A top-level window can or can not being owned but was never a child; Further we can say that it can having an owner but never has a parent.
    • top-level windows can be either overlapped Windows (have ws_overlapped style and generally used as app Lication main window) or popup windows (have ws_popup style, usually temporary windows like message boxes and D Ialogs);
    • The coordinates used in CreateWindow (Ex), MoveWindow, SetWindowPos, and so on is always scren coordinates (relative to P-left corner of the screen).

Windows API-----Top Level window

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.