gpt4 book ai didi

C++ WinAPI 'AnimateWindow' 尚未声明

转载 作者:太空宇宙 更新时间:2023-11-04 14:16:34 24 4
gpt4 key购买 nike

我正在尝试制作 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com