Re: a *working* PostThreadMessage() implementation...?
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Wed, 01 Oct 2008 17:02:54 -0500
On Wed, 1 Oct 2008 13:47:55 -0700 (PDT), Ajay Kalra <ajaykalra@xxxxxxxxx>
wrote:
On Oct 1, 1:22 pm, "Doug Harrison [MVP]" <d...@xxxxxxxx> wrote:
Better to use a hidden or message-only window and use plain old
PostMessage.
Why though? We used it on our main gui thread and had no issues. Any
particular reason for not using PostThreadMessage?
I meant it would be better than trying to roll one's own message queue to
work around the PostThreadMessage issues. In order for PTM to work right,
all message loops have to account for it, which could be a problem down the
road if you add a secondary message loop for some reason. That's in
addition to the secondary message loops Windows runs in various scenarios.
It just seems easier to designate a window to receive messages.
--
Doug Harrison
Visual C++ MVP
.
- Follow-Ups:
- Re: a *working* PostThreadMessage() implementation...?
- From: .rhavin grobert
- Re: a *working* PostThreadMessage() implementation...?
- References:
- a *working* PostThreadMessage() implementation...?
- From: .rhavin grobert
- Re: a *working* PostThreadMessage() implementation...?
- From: Doug Harrison [MVP]
- Re: a *working* PostThreadMessage() implementation...?
- From: Ajay Kalra
- a *working* PostThreadMessage() implementation...?
- Prev by Date: Re: How to set CListCtrl item text color?
- Next by Date: Re: How to set CListCtrl item text color?
- Previous by thread: Re: a *working* PostThreadMessage() implementation...?
- Next by thread: Re: a *working* PostThreadMessage() implementation...?
- Index(es):