Enum Problem
-
Hallo zusammen,
ich versteh nich wieso mein code hier nicht funktioniert.
meine Methode loadScreen() wird nicht einmal aufgerufen
was stimmt hier nicht?#include "enuMator.h" #include <windows.h> BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam) { char title[500]; ZeroMemory(title, sizeof(title)); if(!IsWindowVisible(hWnd)) return true; //GetWindowText(hWnd, title, sizeof(title)/sizeof(title[0])); enuMator* pAusgabe = (enuMator*)lParam; pAusgabe->loadScreen(); return true; } void enuMator::loadScreen() { emit sendText(tr("Fenster gefunden: ") + tr("test") + tr("\n")); } void enuMator::beginEnum() { enuMator* weiterGehts = this; EnumWindows(MyEnumProc, (LPARAM)&weiterGehts); }
-
das is ein & zuviel drin
&weiterGehts