Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Controls Config
#1
How can i get current state of checkboxes and data of editboxes? Wish to have button to save it and load as default setup on next dialog startup

Some stupid way that doesnt work:

Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4"
str c3=1
str e4=10
if(!ShowDialog("testd" &testd &controls)) ret


BEGIN DIALOG
0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
3 Button 0x54012003 0x0 60 32 10 10 ""
4 Edit 0x54032000 0x200 12 32 32 12 ""
5 Button 0x54032000 0x0 132 32 48 14 "Button"
1 Button 0x54030001 0x4 116 116 48 14 "OK"
2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
END DIALOG
DIALOG EDITOR: "" 0x2040104 "" "" "" ""

ret
messages
sel message
    case WM_INITDIALOG
    case WM_DESTROY
    case WM_COMMAND goto messages2
ret
messages2
out GetCurDir
str tempstr1
str tempstr2
str tempstr3
sel wParam
    case IDOK
    case IDCANCEL
    case 3
        tempstr1 = val(c3)
    case 4
        tempstr2 = val(e4)
    case 5
        tempstr3.from(GetCurDir "\Config.ini")

        rset tempstr1 "CheckBoxValue" "Section1" tempstr3
        rset tempstr2 "EditBoxValue" "Section1" tempstr3
ret 1
#2
With functions like but() and str.getwintext().
Or easier: Save dialog control values
#3
nice, thx


Forum Jump:


Users browsing this thread: 1 Guest(s)