Embedding HWND into external process using SetParent

前端 未结 3 1881
一向
一向 2020-11-29 01:00

I\'m trying to embed a window from my process into the window of an external process using the SetParent function and have encountered a few problems that I

3条回答
  •  星月不相逢
    2020-11-29 01:48

    Well, I finally found the answer to my question.

    To fix the issue with the main app losing focus you need to use the AttachThreadInput function to attach the embedded window thread to the main app thread.

    Also, one can use the TranslateAccelerator function in response to WM_KEYDOWN messages to ensure accelerator messages of the main app are triggered.

提交回复
热议问题