Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.11.17;
Скачать: 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 вся ветка

Текущий архив: 2003.11.17;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.029 c
11-56552
savva
2003-02-19 10:07
2003.11.17
Memo and Insert - работает или нет?


8-56781
Col Isaev
2003-07-21 17:08
2003.11.17
Очистить Image


1-56662
Вованчик
2003-11-05 10:42
2003.11.17
Прозрачная кнопка


1-56716
reticon
2003-11-06 23:33
2003.11.17
Абстрактные методы класса


1-56578
SLesh
2003-11-06 10:26
2003.11.17
Date