项目里需要将tecplot界面嵌入QT的Widget里,但是使用Findwindow函数获得了程序的句柄,使用setparent函数将tecplot界面嵌入后,tecplot的子窗口里的按钮失效了。
HWND tec = FindWindow(L"QWidget",L"Tecplot 360 EX 2016 R2");
HWND tec_qt = (HWND)ui->widget->winId();
SetParent(tec, tec_qt);
好吧没人回答,看来只能改下软件要求了
发送 WM_SETFOCUS / SetFccus() 设置下焦点
调用下 EnableWindow SetForegroundWindow