03-14-2008, 09:15 AM
Function Dialog357
Macro that shows the dialog
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Edit 0x54030080 0x200 8 10 96 14 ""
;4 Edit 0x54030080 0x200 8 32 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,GdiObject-- brush1=CreateSolidBrush(ColorFromRGB(240 240 100))
,GdiObject-- brush2=CreateSolidBrush(ColorFromRGB(128 128 255))
,
,case WM_CTLCOLOREDIT
,;wParam is handle to the device context of the control
,;lParam is control handle
,sel(GetWinId(lParam))
,,case 3
,,SetBkMode wParam TRANSPARENT
,,SetTextColor wParam ColorFromRGB(0 0 255)
,,ret brush1
,,case 4
,,SetBkMode wParam TRANSPARENT
,,SetTextColor wParam ColorFromRGB(255 0 0)
,,ret brush2
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Macro that shows the dialog