04-21-2009, 01:34 PM
I would appreciate any advice on the way to change the background color of dialog control "5" (static) in the following example :
Function MyStopWDialog
Function MyStopWDialog
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;Housekeeping :Toolbar vs Dialog, minimizing and closing with apps.htm
;BEGIN DIALOG
;0 "" 0x90C80840 0x0 0 0 223 135 "Dialog"
;5 Static 0x54000202 0x0 0 0 26 12 "9999"
;END DIALOG
;DIALOG EDITOR: "" 0x203000C "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,,__Font-- f
,,f.Create("Courier New" 10 0)
,,f.SetDialogFont(hDlg "5")
,,f.SetDialogFontColor(hDlg 0xff0000 "5")
,,SetTimer hDlg 0 1000 0
,case WM_TIMER
;,,STWc=0 : Initialise - Reset
;,,STWc=1 : Start
;,,STWc=2 : Stop
,,if STWc
,,,if STWc=1
,,,,int t1=GetDlgItemInt(hDlg 5 0 0)
,,,,t1+1
,,,,SetDlgItemInt(hDlg 5 t1 0)
,,,else
,,,,ret
,,else
,,,t1=0
,,,SetDlgItemInt(hDlg 5 t1 0)
,,,SetEvent(t_hevent)
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
ret 1