Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2003.11.17;
Скачать: [xml.tar.bz2];

Вниз

Как в 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;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.009 c
6-56805
Novenkij
2003-09-21 21:54
2003.11.17
Специ помогите. error Socket


3-56458
Raduga
2003-10-29 10:28
2003.11.17
Добавление данных из одной таблицы в другую


3-56496
Raduga
2003-10-28 11:30
2003.11.17
Формат вывода даты (ADO+Access)


1-56569
kamerad
2003-11-06 12:37
2003.11.17
Компоненты


3-56483
Developerr
2003-10-27 13:31
2003.11.17
Изменение номеров в поле!!!





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский