如我要创建一个总不在前的窗口,用CreateWindowEx函数实现,其中的DWORD dwExStyle参数有WS_EX_NOACTIVATE这个值,说明是:Windows 2000: A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window
结果编译时就不认识WS_EX_NOACTIVATE这个值,说没定义。我看了其他值,只要是win2000才有的风格,都编译时不认识。怎么回事?望高手解决!总不在前的窗口是很有用的。
结果编译时就不认识WS_EX_NOACTIVATE这个值,说没定义。我看了其他值,只要是win2000才有的风格,都编译时不认识。怎么回事?望高手解决!总不在前的窗口是很有用的。
然后在工程里(stdafx.h) 加入定义:
#define _WIN32_WINNT 0x0500或者干脆在调用CreateWindowEx之前加入下面这一行就可以了
#define WS_EX_NOACTIVATE 0x08000000L
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/