Trouble with GetActiveWindow

Trouble with GetActiveWindow

I keep getting the following compiler error when trying to use the GetActiveWindow API.

Error 1 error #6423: This name has already been used as an external function name. [GETACTIVEWINDOW]

My code segment is as follows:

use user32
implicit none
integer(HANDLE) hWnd
hWnd = GetActiveWindow

I haven't declared, used or even mentioned GetActiveWindow anywhere else in my project. What am I doing wrong? Is the problem related to the fact that the function has no parameters passed into it?

3 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Correct line should be:

hWnd = GetActiveWindow()

I think compiler supposes that GetActiveWindow without () is variable not function.

Exactly.

Steve - Intel Developer Support

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen