HtmDlg() [v0.51]

Author: SKAN Last Modified: 20100713


HtmDlg() works very much like MsgBox but with one difference and a couple of advantages. The difference is that: HtmDlg() needs a HTM file/URL unlike MsgBox which accepts plain text. The two advantages are:

1) HtmDlg() uses webcontrol to display message which offers vast text formatting capabilities.
2) HtmDlg() offers 9 user-definable, fully customizable buttons.

HtmDlg( _URL="", _Owner=0, _Options="", _ODL="," )

For more details of the functions's parameters and return value, please see it's source code or the document.

Remarks

The library lacks an external documentation. The textfile is extracted from the header and bottom of source.

For update's details and remarks related to the functions, please see the AutoHotkey Forum: http://www.autohotkey.com/forum/viewtopic.php?t=60215

License

nonexistent

Example

; #Include HtmDlg.ahk
#NoEnv
SendMode Input
#SingleInstance, Force
SetWorkingDir %A_ScriptDir% 

bgcolor := GetSysColor(15)  ; Window Background color for the current desktop theme

FileDelete, demo.htm
FileAppend,
( Join

This area of this Dialogbox uses HTM which means you can format you r message using Italics, Bold, Colors and all other formatting HTML permits.

Please note that this webcontrol mimics a static control using these workarounds:
1) Your comput er system's window color is %bgcolor%, and is being used as the bgcolor of HTM so a s to simulate transparency.
2)
This control has been disabled and so you cannot select/copy text.
3)
The vertical scrollbar is just outside the client-area of this dialog.

Do you like this MessageBox?

) , demo.htm URL=file:///%A_ScriptDir%\demo.htm Options := "Buttons=Yes/No/50-50, HtmW=360, HtmH=260, BEsc=3" Sel := HtmDlg( URL, "", Options ) Return ; // end of auto-execute section // GetSysColor( DisplayElement=1 ) { VarSetCapacity( HexClr,7,0 ), SClr := DllCall( "GetSysColor", UInt,DisplayElement ) RGB := ( ( ( SClr & 0xFF) << 16 ) | ( SClr & 0xFF00 ) | ( ( SClr & 0xFF0000 ) >> 16 ) ) DllCall( "msvcrt\sprintf", Str,HexClr, Str,"%06X", UInt,RGB ) Return HexClr }