Dev C ++错误中的CueBanner [英] CueBanner in Dev C++ Error

查看:144
本文介绍了Dev C ++错误中的CueBanner的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我试图在WinAPI中获得与firefox的搜索控件相同的样式,这种带有搜索引擎名称的灰色文本在单击时会消失.我发现Edit_SetCueBannerText()包含必需的comctrl.h,但是当我对其进行编译时,出现此错误:

未声明"Edit_SetCueBannerText"

我该怎么办?
非常感谢

Hello,
I''m trying to get in WinAPI the same style like in the search control of firefox, this grey text with the name of the search engine which disappears when you click on it. I found Edit_SetCueBannerText(), included the requierd comctrl.h, but when I compile it I get this error:

`Edit_SetCueBannerText'' undeclared

What can I do?
Thanks a lot

推荐答案

您可以在 ^ ],要使用te宏,您的应用程序应至少针对 Windows XP Windows Server 2003 .

然后,相应地在使用Windows标头(Windows) [ ^ ],您应该在添加任何系统标头之前将以下几行添加到您的源代码中:

As you can see on the documentation of the Edit_SetCueBannerText Macro (Windows)[^], to use te macro your application should target at least Windows XP or Windows Server 2003.

Then, accordingly with the documntation at Using The Windows Headers (Windows)[^], you should add the lines below to your source code, before than including any system header:

<br />
#if !defined(WINVER)<br />
#define WINVER 0x0501 // Target Windows XP or later<br />
#endif<br />
<br />
#if !defined(_WIN32_WINNT)<br />
#define _WIN32_WINNT 0x0501 // Target Windows XP or later<br />
#endif<br />




您还需要设置应用程序清单以通用控件 6.0版(即 Comctl32.dll 6.0版)为目标.




You also need to setup the manifest of your application to target the Common Controls version 6.0 (i.e. Comctl32.dll version 6.0).


它不起作用,再次出现相同的错误.
清单自动创建了Dev C ++,就是这样:
it didn''t work, same error again.
the manifest created Dev C++ automatically, this is it:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly

  xmlns="urn:schemas-microsoft-com:asm.v1"

  manifestVersion="1.0">
<assemblyIdentity

    name="DevCpp.Apps.WakeUp"

    processorArchitecture="x86"

    version="1.0.0.0"

    type="win32"/>
<description>test</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity

            type="win32"

            name="Microsoft.Windows.Common-Controls"

            version="6.0.0.0"

            processorArchitecture="x86"

            publicKeyToken="6595b64144ccf1df"

            language="*"

        />
    </dependentAssembly>
</dependency>
</assembly>



可能有什么问题吗?



could be anything wrong with it?


这篇关于Dev C ++错误中的CueBanner的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆