If hwnd is an asynchronous window (that is, it does not have a style of WS_SYNCPAINT), only it and its asynchronous children are updated. They are sent WM_PAINT messages from this function. If the window is owned by a different thread from the thread issuing the call, the message is sent asynchronously (using WinPostMsg) and not synchronously (using WinSendMsg).
If the window does not have an invalid region, a WM_PAINT message might not be sent.
If hwnd is a child of a nonclip-children parent, the update region of hwnd is subtracted from the update region of the parent, if the parent has one. This is so that any parent-window drawing after hwnd does not draw over whatever is drawn by hwnd.