message from Win32 window to CFwindow

  • Thread starter Thread starter Thomas
  • Start date Start date
T

Thomas

Hi experts!

Is it possible for me to post a message from Win32 native window to CF
managed window?

I know that CF managed window can receive message using MessageWindow class,
however, I don't know how to get the window handler of the CF managed window
(which is needed for the PostMessage() Win32 API) using Win32 native code.

Best Regards,
Thomas Tse
 
You have quite a few choices here. You can write a window
handle of the MessageWindow to the registry or to some
flagging file in some known location or can send it with
HWND_BROADCAST message from the managed side.

HTH... Alex
 
Thomas,

I would suggest using either BroadcastWindowMessage or PostThreadMessage.
If you have a way of determining which thread your message proc is running
on, then use PostThreadMessage and avoid spamming other apps. If not,
register a unique system message with RegisterWindowMessage and send it
with BroadcastWindowMessage.

HTH,
Dan

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top