Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is a top-level window in win32 programming?

I don't quite understand what the difference between a window that I create via CreateWindowEx and a "top-level" window.

What is a top level window in win32 programming?

like image 753
bodacydo Avatar asked Aug 15 '13 00:08

bodacydo


Video Answer


2 Answers

The MSDN entry About Windows offers the following definition:

A window that has no parent, or whose parent is the desktop window, is called a top-level window.

A more practical explanation is given in the blog post A window can have a parent or an owner but not both:

A window can be created as a child window (WS_CHILD set) or a top-level window (WS_CHILD not set).

like image 164
IInspectable Avatar answered Nov 15 '22 10:11

IInspectable


A top-level window is a window that is not a child window, or has no parent window (which is the same as having the "desktop window" as a parent).

like image 29
Peter Ritchie Avatar answered Nov 15 '22 10:11

Peter Ritchie