Re: Re: WTL, GUI and Thread
"Jim Barry" <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <49238A6BC1774AC8A96792A2E3666CDE@jbarry> |
Mark Grandau wrote:
> If you're looking for something more make a custom message that takes a
> CComBSTR. Use reference counting to determine when the buffer is
> destroyed.
> Thats exactly how COM interfaces pass strings.
That's not reference counting, it's just transfer of ownership. Anyway, in
this case I would suggest storing the text in a string object (CString,
std::wstring, or whatever) accessed by both threads and protected by a
critical section. Then use PostMessage to tell the UI thread that the status
has changed.
- Jim
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wtl/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/wtl/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/