winapi - If PostMessage Succeeded, is the message guaranteed to be processed by the window? -
i have background thread process data , want send result main window, window may destroyed before background thread exits.
i use postmessage
deliver newly created objects (created in heap), if succeed, message processed main window surely?
if not, best practice kind of situation?
ps: concern when posting messages, window valid, destroyed before message delivered. if so, cannot delete
objects.
i use postmessage deliver newly created objects (created in heap), if succeed, message processed main window surely?
if call postmessage
succeeds, message placed in queue. message processed when thread pumps message queue. if thread fails pump queue, or if recipient window no longer exists when message processed, not delivered.
Comments
Post a Comment