#include<windows.h>
keyBoard::keyBoard(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
connect(ui->pushButton, &QPushButton::clicked, [&] {
void* keyBoard = nullptr;
bool m_b = Wow64DisableWow64FsRedirection(&keyBoard);
QString boardExe = "C:/Windows/System32/osk.exe";
QString params = "";
ShellExecute(nullptr, L"open", (LPCWSTR)boardExe.utf16(), (LPCWSTR)params.utf16(), nullptr, SW_SHOWNORMAL);
if (m_b)
{
Wow64RevertWow64FsRedirection(keyBoard);
}
});
}
Qt调用虚拟键盘(软键盘)
最新推荐文章于 2024-06-17 16:26:19 发布