AnimateWindow && Dev-C++ problems
So i'm trying to use the AnimateWindow() function to animate a static control i have, but the compiler is spouting out errors like thats its job. ^_^ i've downloaded the v3.6 win api from devpaks.org and i've linked libuser32.a to my project, but it still acts like it doesn't know what i'm talking about. my code is:
Code:
case ID_BUTTON1:
{
AnimateWindow(GetDlgItem(hwnd, ID_LEFT), 1000, AW_SLIDE | AW_VER_POSITIVE);
}
break;
and the errors are
Quote:
main.c: In function `WndProc':
main.c:153: error: `AW_SLIDE' undeclared (first use in this function)
main.c:153: error: (Each undeclared identifier is reported only once
main.c:153: error: for each function it appears in.)
main.c:153: error: `AW_VER_POSITIVE' undeclared (first use in this function)
also, i found a post that had a similar problem on the board and they defined the functions and such so i copied this code:
Code:
#define AW_HOR_POSITIVE 0x00000001
#define AW_HOR_NEGATIVE 0x00000002
#define AW_VER_POSITIVE 0x00000004
#define AW_VER_NEGATIVE 0x00000008
#define AW_SLIDE 0x00040000
typedef BOOL (WINAPI *lpfnAnimateWindow)(HWND hwnd, DWORD dwTime, DWORD dwFlags);
lpfnAnimateWindow AnimateWindow;
and then it compiled just fine, but if i try to run it it crashes when i press the button.
ideas? thanks