Hi HSE
This is the markup string for the About Dialog
"{Padding 20}", \
"[Height 11]", \
"{Cover 0}", \
"[Indent 150, Align 'LEFT']", \
"[Height +3, Bold]&ABOUT_TEXT{B}[~]", \
"[Italic]Version &VER_PRODUCTVERSION_STR{P}[~]", \
"[Color #3F3F3F]", \
"Designed with ObjAsm{B}", \
"© ©RIGHT{P}", \
"[Color #5F4FFF]", \
@CatStr(<!">, %BUILD_DATE_STR, \
< - Build: >, %BUILD_NUMBER, <->, %ASSEMBLER, <->, \
%TARGET_MODE_STR, <->, %TARGET_BITNESS, < !">), \
"[Info ", @CatStr(<!">, %INFO_BUILD, <!">), ", Font 'Webdings', Height +1]{#69}[~]", \
"[~]{B}{B}", \
"[~]", \
"[~]", \
"[Indent 0, Align 'CENTER']", \
"[Font 'Webdings', Color #FF5F5F, Height +7]{#7E}[~]", \
" Visit us at ", \
"[App ", @CatStr(<!">, %APP_VISIT, <!">), ", Color #0000FF, U]www.objasm.x10host.com[~]{B}", \
"[Font 'Wingdings', Color #408090, Height +1]{#2A}[~]", \
" Email us to ", \
"[App ", @CatStr(<!">, %APP_EMAIL, <!">), ", Color #0000FF, U]objasm@gmx.net[~]{P}", \
"[App ", @CatStr(<!">, %APP_CHECK, <!">), ", Color #0000FF, U]Check for updates[~]", \
"[Info ", @CatStr(<!">, %INFO_UPDATE, <!">), ", Font 'Webdings', H +1, Color #5F5FFF] {#69}[~]", \
"[~]", \
"[~]"
I used @CatStr(...) to embed some constants I used on the parent window
APP_VISIT equ 0
APP_EMAIL equ 1
APP_CHECK equ 2
INFO_BUILD equ 0
INFO_UPDATE equ 1
The implementation is pretty straight forward
Method Application.OnNotify, uses xdi xsi, wParam:WPARAM, lParam:LPARAM
local Img:$Obj(Image), DstRect:RECT
SetObject xsi
mov xax, wParam
.if xax == VIEW_CTRL_ID
mov xdi, lParam
.if [xdi].NMHDR.code == TVNMC_APP_MOUSEUP
.if [xdi].TVNM_APP.dID == APP_VISIT
invoke ShellExecute, [xsi].hWnd, $OfsCStr("open"), \
$OfsCStr("http:/objasm.x10host.com/index.htm"), \
NULL, NULL, SW_SHOW
.elseif [xdi].TVNM_APP.dID == APP_EMAIL
invoke ShellExecute, [xsi].hWnd, $OfsCStr("open"), \
$OfsCStr("mailto:objasm@gmx.net"), \
NULL, NULL, SW_SHOW
.elseif [xdi].TVNM_APP.dID == APP_CHECK
invoke MessageBox, [xsi].hWnd, $OfsCStr("No update available."), \
$OfsCStr("Information"), \
MB_ICONINFORMATION or MB_OK
.endif
.elseif [xdi].NMHDR.code == TVNMC_INFO
.if [xdi].TVNM_INFO.dID == INFO_BUILD
c2m [xdi].TVNM_INFO.pText, offset szBuildInfo, xax
.elseif [xdi].TVNM_INFO.dID == INFO_UPDATE
c2m [xdi].TVNM_INFO.pText, offset szUpdateInfo, xax
.endif
.elseif [xdi].NMHDR.code == TVNMC_DRAW
.if [xdi].TVNM_DRAW.dID == 0
New Img::Image
OCall Img::Image.Init, xsi
OCall Img::Image.%LoadFromRes, $OfsCStr("OA")
mov DstRect.left, 35
mov DstRect.top, 35
mov DstRect.right, 100
mov DstRect.bottom, 100
OCall Img::Image.AlphaDraw, [xdi].TVNM_DRAW.hDC, 255, addr DstRect
OCall Img::Image.Done
.endif
.endif
.endif
MethodEnd
Biterider