using sendmessage to send wm_close to another process

后端 未结 3 618
清酒与你
清酒与你 2020-12-03 19:43

I want to send wm_close to another process, with which i want end that process safely.

int _tmain(int argc, _TCHAR* argv[])
{

    DWORD SetOfPID;
    SetOfP         


        
3条回答
  •  遥遥无期
    2020-12-03 20:06

    Are you sure that the window you are finding is the correct one? You can check easily with Spy++. Moreover, when searching for a window, I think it's better to use EnumWindows. I'm not sure your method is correct.

提交回复
热议问题