6.3w+
社区成员
BOOL CreateProcess(
LPCTSTR lpApplicationName,
LPTSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCTSTR lpCurrentDirectory,
LPSTARTUPINFO lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
然后通过 lpProcessInformation得到进程handle,在通过进程handle得到主窗口hwnd
然后SetWindowText
#include <windows.h>
int main(void)
{
HWND hWnd = FindWindow(NULL,"远程桌面连接");
SetWindowText(hWnd,"hi");
return 0;
}