|
Something like the outlook rule wizard? This creates a window on the fly, but how to add strings to the editbox with hyperlink that mimic the rule wizard and not using the syslink?
Thanks alot.
Jiac
|
|
|
|
|
hi!
I'm using Delphi7 when I try to compile a component that we did, it gave me the error file not found htmllite.pas... somebody can send me that file?... or advice
thanks
|
|
|
|
|
I changed the function prototype to the following and everything appears to work fine under VS6/7:
typedef BOOL (WINAPI *LPFNREGISTERHTMLLITECLASS)(HINSTANCE hInstance);
typedef BOOL (WINAPI *PFNREGISTERHTMLLITECLASS)(HINSTANCE hInstance);
typedef BOOL (WINAPI *LPFNUNREGISTERHTMLLITECLASS)(HINSTANCE hInstance);
typedef BOOL (WINAPI *PFNUNREGISTERHTMLLITECLASS)(HINSTANCE hInstance);
typedef BOOL (WINAPI *LPFNHTMLREPLACECTL)(HWND hDlg, UINT nIDDlgItem);
typedef BOOL (WINAPI *PFNHTMLREPLACECTL)(HWND hDlg, UINT nIDDlgItem);
PFNREGISTERHTMLLITECLASS pRegisterHtmlLiteClass = (PFNREGISTERHTMLLITECLASS)GetProcAddress(hHtmlLite,"_FRegisterHtmlLiteClass@4");
PFNUNREGISTERHTMLLITECLASS pUnregisterHtmlLiteClass = (PFNUNREGISTERHTMLLITECLASS)GetProcAddress(hHtmlLite,"_FUnregisterHtmlLiteClass@4");
PFNHTMLREPLACECTL pHtmlReplaceCtl = (PFNHTMLREPLACECTL)GetProcAddress(hHtmlLite,"_FHtmlReplaceCtl@8");
|
|
|
|
|
quick search in htmllite shows that following tags are supported:
<br>
<img>
<title></title>
<style></style>
<span></span>
<nobr></nobr>
<font></font>
<div></div>
Supported special chars:
&trade; (™)
&reg; (®)
&shy; (­)
&nbsp; ( )
&quot; (")
&copy; (©)
&bull; (•)
&amp; (&)
Supported protocols for img src:
hbmp://
file://
res://
Supported tag atrributes and values:
solid, dotted, dashed, right, left, justify, center, yellowgreen, yellow, windowtext, windowframe, window, whitesmoke, white, wheat, violet, turquoise, transparent, tomato, threedshadow, threedlightshadow, threedhighlight, threedface, threeddarkshadow, thistle, teal, tan, steelblue, springgreen, snow, slategray, slateblue, skyblue, silver, sienna, seashell, seagreen, scrollbar, sandybrown, salmon, saddlebrown, royalblue, rosybrown, red, purple, powderblue, plum, pink, peru, peachpuff, papayawhip, palevioletred, paleturquoise, palegreen, palegoldenrod, orchid, orangered, orange, olivedrab, olive, oldlace, navy, navajowhite, moccasin, mistyrose, mintcream, midnightblue, menutext, menu, mediumvioletred, mediumturquoise, mediumspringgreen, mediumslateblue, mediumseagreen, mediumpurple, mediumorchid, mediumblue, mediumaquamarine, maroon, magenta, link, linen, limegreen, lime, lightyellow, lightsteelblue, lightslategray, lightskyblue, lightseagreen, lightsalmon, lightpink, lightgrey, lightgreen, lightgoldenrodyellow, lightcyan, lightcoral, lightblue, lemonchiffon, lawngreen, lavenderblush, lavender, khaki, ivory, infotext, infobackground, indigo, indianred, inactivecaptiontext, inactivecaption, inactiveborder, hover, hotpink, hotlight, honeydew, highlighttext, greenyellow, green, graytext, gray, gradientinactivecaption, gradientactivecaption, goldenrod, gold, ghostwhite, gainsboro, fuchsia, forestgreen, focusrect, floralwhite, firebrick, dodgerblue, dimgray, default, deepskyblue, deeppink, darkviolet, darkturquoise, darkslategray, darkslateblue, darkseagreen, darksalmon, darkred, darkorchid, darkorange, darkolivegreen, darkmagenta, darkkhaki, darkgreen, darkgray, darkgoldenrod, darkcyan, darkblue, cyan, crimson, cornsilk, cornflowerblue, coral, chocolate, chartreuse, captiontext, cadetblue, buttontext, buttonshadow, buttonhighlight, buttonface, burlywood, brown, blueviolet, blue, blanchedalmond, black, bkground, bisque, beige, background, azure, aquamarine, aqua, appworkspace, antiquewhite, alt9, alt8, alt7, alt6, alt5, alt4, alt3, alt2, alt1, aliceblue, activecaption, activeborder, zwnj, line-through, underline, none, bold, italic, normal, matched, previous, auto, width-min, width-max, width, text-indent, text-decoration, text-align, src, size, phase, padding-top, padding-right, padding-left, padding-bottom, padding, num-phases, margin-top, margin-right-min, margin-right-max, margin-right, margin-left-min, margin-left-max, margin-left, margin-bottom, margin, linkid, line-height, image-mask, href, hover-phase, hover-highlight, hover-decoration, hover-color, highlight, font-weight, font-style, font-size, font-family, focus-rect-color, face, color, class, border-top-width, border-top-style, border-top-color, border-top, border-right-width, border-right-style, border-right-color, border-right, border-left-width, border-left-style, border-left-color, border-left, border-bottom-width, border-bottom-style, border-bottom-color, border-bottom, border, background-image, background-color, align
|
|
|
|
|
I've succeeded to build exacly the same interface as .NET setup (shown on the top left image in the article). If someone interested I can upload project. Also I've succeeded to convert dll into static lib file, so now it is possible to link htmllite component statically in the .exe file (.exe will not depend on htmllite.dll).
|
|
|
|
|
Hello, many thanks for sharing these details!
|
|
|
|
|
Nice Work Here,
Please, Sourcer, can you upload the project and lib or counld you send them to me at heshamz@yahoo.com
Thanks
|
|
|
|
|
Hello
Yes, would like to have the source lib if I can
Thanks
Alex aevans@leading.com.au
|
|
|
|
|
Hi.
I am wondering how you managed to convert htmllite.dll into a static lib? Was it by using IDA, converting to .asm, and then recompiling with something like MASM?
Also, it is possible to obtain the .lib? My e-mail is genghis86@hotmail.com
Thanks.
|
|
|
|
|
Would love this lib as well, even better would be info on how you went from a dll to a full static lib, as I've got a (free) dll I'd rather use as a static lib.
|
|
|
|
|
|
I've been playing with the markup a bit and it appears that it is very flexible on what attribute goes with which element. For instance, the following is perfectly valid:
<p color=white background-color=blue padding=5 face="Times New Roman" font-weight=bold font-size=28>hello</p><br />
I have yet to find a way to control the background color for the entire "body" of the document, however...
mZ
|
|
|
|
|
It appears that you have to simulate tables using the paragraph element's margin-top, margin-left and width attributes.
Here is a small example:
<style>
.titlerow { highlight: black; color: white; padding: 5; }
.leftcol { margin-top: auto; width: 200; highlight: #003399; color: white; padding: 5; }
.rightcol { margin-top: previous; margin-left: 200; padding:5; highlight: white; }
.bottom { margin-top: auto; align: right; highlight: infobackground; color: infotext; padding: 5; }
</style>
<p class="titlerow">Sample Page #1</p>
<p class="leftcol">Left Column<br>This is the left column.<br> </p>
<p class="rightcol">Right Column<br>This is the right column.<br> </p>
<p class="bottom">Exit</p> margin-top: auto snaps the current paragraph to the bottom of the previous paragraph. margin-top: previous aligns the top margin of the current paragraph with the top margin of the previous paragraph.
I am not entirely sure if you can pull off nested tables very easily using this technique, however.
EDIT: Forgot to escape ...
Taa, taa...
mZ
|
|
|
|
|
That's cool improvisation - Thanks for sharing!
|
|
|
|
|
>I have yet to find a way to control the background color for the entire "body" of the document
The control may send a WM_CTLCOLOR* message to determine the BG color. Or it may be possible to subclass it's WM_ERASEBKGND. I will have an experiment with this, at some point
|
|
|
|
|
Nice article
I've tried to convert your sample to a WTL class but I was unable to call the method pfnRegHtmlLiteClass without getting a ESP check error in Visual Studio 6.
Also I was wondering of the call
(*pfnRegHtmlLiteClass);
that generated a warning at compile time.
I thought something like
pfnRegHtmlLiteClass();
was more appropriate.
Cheers,
Pascal
|
|
|
|
|
I changed the function prototype to the following and everything appears to work fine under VS6:
typedef void (WINAPI *PFRegisterHtmlLiteClassFunc)(int);
...and I call it like so:
pfnRegHtmlLiteClass(0);
Seems to work just fine so far using a custom control tool on a CFormView.
mZ
|
|
|
|
|
Thanks this fixed the problem.
Now I have to understand the HTML syntax supported by the thing
Cheers,
Pascal
|
|
|
|
|
EOM
-- modified at 9:29 Saturday 8th October, 2005
|
|
|
|
|
Thanks
|
|
|
|
|
At the risk of saying "me too," I really think highly of this article and the research you did. I appreciate the effort you put forth and the article which resulted. It's articles like this that make this web page a great resource.
Good job.
John
|
|
|
|
|
It's possible to make a managed assembly .dll for using in C# and VB.NET?
|
|
|
|
|
There's nothing stopping someone turning this into a managed class..
|
|
|
|
|
Actually, Microsoft did this in their ASP.NET Web Matrix application.
|
|
|
|
|
Here's a starting point
using System;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Drawing;
namespace WindowsApplication1
{
public class HTMLLiteControl : System.Windows.Forms.TextBox
{
public HTMLLiteControl()
{
this.AutoSize = false;
this.Multiline = true;
this.SetStyle( ControlStyles.ResizeRedraw, true );
this.SetStyle( ControlStyles.EnableNotifyMessage, true );
}
[DllImport( "htmllite.dll", EntryPoint "_FRegisterHtmlLiteClass@4" )]
public static extern void RegisterHtmlLite( int unused );
private const int WM_ERASEBKGND = 0x0014;
protected override CreateParams CreateParams
{
get
{
RegisterHtmlLite( 0 );
CreateParams createParams = base.CreateParams;
createParams.ClassName = "HTMLLITE";
return createParams;
}
}
protected override void WndProc( ref Message m )
{
if( m.Msg == WM_ERASEBKGND )
{
using( Graphics screenGraphics = Graphics.FromHdc(m.WParam) )
using( Brush b = new SolidBrush( this.BackColor ) )
screenGraphics.FillRectangle( b, this.ClientRectangle );
}
base.WndProc( ref m );
}
public string HTML
{
get
{
return html;
}
set
{
base.Text = value;
html = value;
}
}
private string html = string.Empty;
}
}
|
|
|
|
|