When creating a windowed object in Microsoft (MS) Windows, one usually starts with a predefined window class, which MS has established. You'll notice how simple the code is to create a rather complex object, because most of the work has already been done by the developers of the class.
There is built-in message handling, so that the window can respond to messages such as WM_CLOSE. From StackOverflow,"The WM_SIZE message is sent to a window when its size has been changed; if that size change was to minimize the window, then the wParam argument will be SIZE_MINIMIZED."
The window may also have a title bar, with various controls, such as a maximize, minimize and restore button, which simply send those messages. Dialog windows often do not have those controls. However, the code behind the window, unless specifically modified, still responds to the message to minimize.
[BTW, there are many free download managers, which will not bother you with a nag screen. As with any software, test a replacement downloader at VirusTotal before using, though!]