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 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Correct line should be:

hWnd = GetActiveWindow()

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


Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today