我正在尝试制作 WinAPI C++ 程序,但我遇到了以下错误:
error: 'AW_SHOW' was not declared in this scope
error: 'AW_HIDE' was not declared in this scope
error: 'AW_BLEND' was not declared in this scope
error: 'AnimateWindow' was not declared in this scope
error: 'SW_MINIMISE' was not declared in this scope
我尝试使用::AnimateWindow 但是我收到了同样的错误。 这是我的头文件,包含在windows.h之前
#ifdef WINVER
#undef WINVER
#endif
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define WINVER 0x0500
#define _WIN32_WINNT 0x0500
我还尝试将变量设置为 0x0502,并在 Winuser.h 中为 AnimateWindow 注释掉预处理器。
最佳答案
想通了。
发生错误的文件包含在我的 main.cpp 中,但它包含在 main.cpp 中的 windows.h 之后。
关于C++ WinAPI 'AnimateWindow' 尚未声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10667431/