08/05/22 14:14:17
>>217
こんなんでいいのかな?
#include<windows.h>
#include<stdio.h>
int main(void){
char title_buf[256], *class_name="TMainWnd";
int title_len;
HWND hwnd;
hwnd=FindWindow(class_name, NULL);
if(hwnd==NULL){
printf("Window not found. class name [%s]\n", class_name);
return 1;
}
title_len=GetWindowText(hwnd, title_buf, sizeof(title_buf)-1);
if(title_len>=0) printf("%s\n", title_buf);
return 0;
}