The window handle that is passed to this function can be the handle of a window with the same, or different, message queue as the caller, thereby allowing the caller to obtain data from windows belonging to other threads.