Вниз
Скачать: CL | DM;

Как в Dll поместить HTML ки?   Найти похожие ветки 

 
~GaMeRd~ ©   (2003-11-06 08:35) [0]

сабж. Или просто код, а потом генерировать где-нибудь в тэмпах странички?


 
han-bratan   (2003-11-06 11:33) [1]

а просто исходник незя положить рядом с DLL? Если нет то наверное надо написать небольшую тулзенб которая будет генерировать Delphi код вида
var
slHTMLBody: TStringLsit;
...
slHTMLBody.Add("Первая строка из файлва HTML");
slHTMLBody.Add("Вторая строка из файлва HTML");
...

а потом просто slHTMLBody.SaveToFile(TempFile);

вот типа и все, можно наверное и еще както... как ресурс какойто наверное, точно не скажу.


 
y-soft ©   (2003-11-06 12:10) [2]

HTML можно включить в DLL как ресурс

В RC-файле указать примерно так:

RESURCE_NAME Html "PATH_TO_HTM"

Потом скомпилировать RES с помощью BRCC.exe и засунуть в Dll

{$R MY_HTML_RES}


 
nikkie ©   (2003-11-06 13:50) [3]

в дополнение к y-soft: открыть эту страницу в IE можно, указав адрес с помощью протокола res. если хочется открывать страницу в произвольном браузере, то ее надо будет извлечь в файл.

Res Protocol

Specifies a resource that will be obtained from a module.

Syntax

res://sFile[/sType]/sID

Possible Values

sFile Required. Specifies the path and file name of the module that contains the resource.

sType Optional. Specifies the 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 below for more information. If this parameter is not specified, the default resource type is RT_HTML.

sID Required. Specifies the 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 below for more information.

Remarks

Available as of Microsoft® Internet Explorer 4.0 or later.

Example

The following 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"


 
y-soft ©   (2003-11-06 14:26) [4]

В дополнение к nikkie © (06.11.03 13:50) [3] :)

Для показа можно также использовать функции

ShowHTMLDialog или ShowHTMLDialogEx из MsHtml.dll, тогда будет выглядеть вообще, как обыкновенное окно. Примеры использования есть в MSDN


 
~GaMeRd~ ©   (2003-11-06 20:40) [5]

Псибо, попробую.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.017 c
9-56428
bss
2003-05-14 12:02
2003.11.17
Как грамотно сделать движущийся талевый фон?


14-56818
Nelud
2003-10-23 12:35
2003.11.17
Нужна здоровая критика!


8-56770
SergeSV
2003-07-19 17:46
2003.11.17
360-ти градусная фотография


1-56614
amisare
2003-11-05 19:30
2003.11.17
Снова TFileStream


8-56772
pavel_k
2003-07-18 22:00
2003.11.17
Media player




   Наверх