C++ Winapi FindWindow Problem

01/27/2011 16:38 ZackBlack#1
Hi,
hab folgendes Problem:
Will ein Fenster umbennen, das will aber nicht wirklich.
Code:
#include <Windows.h>
#include <iostream>

using namespace std;

int main()
{
	char lol[] = "^^";
	HWND hwnd; 
 hwnd=FindWindowA(NULL, "Dokument - WordPad");  // Fensterhandle anhand von Titel holen
    SetWindowTextA(hwnd, lol);  // Titelleiste ändern 
return 0;
}
Weis jemand zufällig warum? Es lässt sich kompilieren, aber es macht nichts.
Toll Problem 30s später gelöst. Schleife hinzugefügt, da stimmte wohl das Timing nicht. Sorry das ich das nicht vor dem erstellen des Threads probiert hab.