Why does this not work? (Win32api)

I get this error when compiling with mingw g++ ani.cpp

ERROR:
1
2
3
4
ani.cpp: In function 'int main()'
ani.cpp:8:31: error: 'AnimateWind
  AnimateWindow(hwnd, 200, NULL);
                               ^ 

ANI.CPP:
1
2
3
4
5
6
7
8
9
10
#include <iostream>
#include <windows.h>
using namespace std;

int main ()
{
	HWND hwnd = FindWindow(NULL,TEXT("Window Name Here"));
	AnimateWindow(hwnd, 200, AW_BLEND);
	return 0;
}

How do you fix this i have included the windows header file. But why is it still not working?
Last edited on
closed account (Dy7SLyTq)
lookk at the first parameter. you are using a data type not an object of it
But what does that have to do with "was not declared in this scope"?
closed account (Dy7SLyTq)
because you are trying to use a function with parameters that dont exist
Thay are all there AnimateWindow takes three parmas.
Doc: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632669(v=vs.85).aspx
closed account (Dy7SLyTq)
yes it takes three paramete...... im sorry i didnt realize.... i thought your first parameter was HWND not hwnd. sorry about that
Will thanks for trying. lol
Topic archived. No new replies allowed.