06-08-2008, 03:05 PM
okay im trying to make one with multiple color edits
this is the code
but only the first one works
do you think you could please fix the code
thanks
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3 4 8 9"
str e3 e4 si8 si9
si8="$qm$\findhtm.ico"
si9="$qm$\findhtm.ico"
if(!ShowDialog("TEST_COLOR" &TEST_COLOR &controls)) ret
BEGIN DIALOG
0 "" 0x90C80A44 0x100 0 0 169 95 "Logginer"
2 Button 0x54030000 0x4 114 70 48 14 "Close"
3 Edit 0x54030080 0x200 46 16 116 14 ""
4 Edit 0x54030080 0x200 46 44 116 14 ""
5 Static 0x54000000 0x0 32 18 48 12 "ID"
6 Static 0x54000000 0x0 12 46 48 12 "Password"
7 Static 0x54000000 0x0 20 72 74 10 "THIS IS A TEST"
8 Static 0x54000003 0x0 6 70 16 16 ""
9 Static 0x54000003 0x0 94 70 16 16 ""
END DIALOG
DIALOG EDITOR: "" 0x2020105 "" ""
ret
messages
int textcolor=0xFF
int background=0xF
int-- jbrush
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
int param=DT_GetParam(hDlg)
sel message
,case WM_INITDIALOG
,jbrush=CreateSolidBrush(background)
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
,case WM_CTLCOLOREDIT
,if(lParam=id(3 hDlg))
,,SetTextColor wParam textcolor
,,SetBkMode wParam TRANSPARENT
,,ret jbrush
,case WM_CTLCOLOREDIT
,if(lParam=id(4 hDlg))
,,SetTextColor wParam textcolor
,,SetBkMode wParam TRANSPARENT
,,ret jbrush
ret
messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
this is the code
but only the first one works
do you think you could please fix the code
thanks
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3 4 8 9"
str e3 e4 si8 si9
si8="$qm$\findhtm.ico"
si9="$qm$\findhtm.ico"
if(!ShowDialog("TEST_COLOR" &TEST_COLOR &controls)) ret
BEGIN DIALOG
0 "" 0x90C80A44 0x100 0 0 169 95 "Logginer"
2 Button 0x54030000 0x4 114 70 48 14 "Close"
3 Edit 0x54030080 0x200 46 16 116 14 ""
4 Edit 0x54030080 0x200 46 44 116 14 ""
5 Static 0x54000000 0x0 32 18 48 12 "ID"
6 Static 0x54000000 0x0 12 46 48 12 "Password"
7 Static 0x54000000 0x0 20 72 74 10 "THIS IS A TEST"
8 Static 0x54000003 0x0 6 70 16 16 ""
9 Static 0x54000003 0x0 94 70 16 16 ""
END DIALOG
DIALOG EDITOR: "" 0x2020105 "" ""
ret
messages
int textcolor=0xFF
int background=0xF
int-- jbrush
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
int param=DT_GetParam(hDlg)
sel message
,case WM_INITDIALOG
,jbrush=CreateSolidBrush(background)
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
,case WM_CTLCOLOREDIT
,if(lParam=id(3 hDlg))
,,SetTextColor wParam textcolor
,,SetBkMode wParam TRANSPARENT
,,ret jbrush
,case WM_CTLCOLOREDIT
,if(lParam=id(4 hDlg))
,,SetTextColor wParam textcolor
,,SetBkMode wParam TRANSPARENT
,,ret jbrush
ret
messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
