Главная страница
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.016 c
14-56898
Val
2003-10-27 10:20
2003.11.17
Радость у меня преогромнейшая


14-56857
iNew
2003-10-27 13:01
2003.11.17
Как в Win200 adv server выставить приоритет процессу?


1-56661
Jack
2003-11-05 10:46
2003.11.17
Exception


14-56905
Igor_thief
2003-10-23 17:01
2003.11.17
TPanel


7-56930
ZeN
2003-09-06 21:21
2003.11.17
Как просканировать папку на предмет наличия файлов...