[omniORB] I wont examples for omniORB4 for VC++6/7 with MFC and Thread

Lars Nilsson chamaeleon at gmail.com
Tue Dec 14 09:17:54 GMT 2004


On Tue, 14 Dec 2004 09:55:05 +0300, Alex Smith <shadowell at mail.ru> wrote:
> I wont examples for omniORB4 for VC++6/7 with MFC and Thread
> or url link at this sample
> 
> i have some problem with use MFC and omniORB :(

Main issue: MFC requires MFC class-calls to be made from the main
thread of your application, not from threads that you may have spawned
manually, or as a result of an incoming CORBA call. Make sure you post
messages instead that the message loop will pick up. That is, in the
thread, don't do mywindow->Show(), use PostThreadMessage() instead
with appropriate information so that your event loop can pick it up,
using PreTranslateMessage() for instance and call mywindow->Show()
from there instead when the data you passed in the PostThreadMessage()
call indicates you should do so.

Regards,

Lars Nilsson



More information about the omniORB-list mailing list