You mean using PostDlgMessage or something like that?

The window is MFC though