ITaskbarList3 undeclared?

北城余情 提交于 2020-01-03 00:38:25

问题


I'm trying to write some c++ code to use the ITaskbarList3, but I'm getting that error. I have confirmed that I am including shobjidl.h (but I checked and this file only defines up to ITaskbarList2). I have Visual Studios 2008 (SP1) and I have Microsoft Windows SDK for Windows Server 2008 installed.

Does anyone know what I am missing?


回答1:


You need to install the Windows 7 SDK. That has an update shobjidl.h with ITaskbarList3.




回答2:


Or you can adapt the content of Windows 7 SDK related to ITaskbarList3 from the shobjidl.h into your code as virtual methods, don't forget their GUID

you have to be careful not to call those methods while using XP or Vista as they only exist from win7 and beyond.




回答3:


ITaskbarList3 is only defined from Windows 7 onwards, so you'll need the Windows 7 SDK to get the updated declarations for the new functionality. Windows Server 2008 is derived from Vista, which only implemented up to ITaskbarList2 (as per Windows XP).



来源:https://stackoverflow.com/questions/1751330/itaskbarlist3-undeclared

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!