CWebBrowser2从资源中装载页面

res://你的应用程序完整路径/资源ID
res Protocol

Specifies a resource that will be obtained from a module.
Syntax
res://sFile[/sType]/sID
Tokens
sFile
Path and file name of the module that contains the resource.

sType
Optional. String or numerical resource type. This can be either a custom resource or one of the RT_ predefined resource types described in the FindResource function reference. If a numerical resource type is specified, the actual number of the identifier, not the identifier name, must follow a # character. See the example for more information. If this parameter is not specified, the default resource type is RT_HTML.
sID
String or numerical identifier of the resource. If a numerical identifier is specified, the actual number of the identifier, not the identifier itself, must follow a # character. See the example for more information.
Remarks
Available as of Microsoft® Internet Explorer 4.0 or later.
Remember, URLs require that special characters such as ‘#’ be escaped. Use ‘%23’ to escape the ‘#’ character.
Example
This example shows the correct and incorrect ways to format the numerical identifier for the resource type.
#define MYBITMAP 234
// This is correct.
"res://mydll.dll/#2/#234"
// This is not correct.
"res://mydll.dll/#2/MYBITMAP"
 


转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 Web@Cool02.com

文章标题:CWebBrowser2从资源中装载页面

文章字数:217

本文作者:零贰

发布时间:2009-02-24, 11:13:13

最后更新:2020-03-25, 18:28:31

原始链接:/html/20090224111313.html

版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。

目录
零址导航 Gitee