Posts: 1,769
Threads: 410
Joined: Feb 2003
i've looked for this but can't seem to find it.
is there a way to have a checkbox in a dialog 'pre-checked' when the dialog starts?
if so, how can i do that? i've looked at some of your dialogs but can't seem to puzzle it out.
thanks.
Posts: 12,041
Threads: 140
Joined: Dec 2002
Assign 1 to the variable.
Posts: 1,769
Threads: 410
Joined: Feb 2003
i tried it in the var declaration statement and the "case WM_INITDIALOG DT_Init(hDlg lParam); ret 1" block but the check box doesn't show that it is 'checked'. am i adding it in the wrong area?
Posts: 12,041
Threads: 140
Joined: Dec 2002
It is in dialog help, initializing controls. Or I don't understand your question.
Better don't set the value in declaration line, because dialog editor overwrites it. Make separate statement.
...
str c3Ch ;;not here because will overwrite
c3Ch=1 ;;here is ok
ShowDialog ...
Posts: 1,769
Threads: 410
Joined: Feb 2003
yep that's what i needed. i got it to work but here's why.
it didn't work when i had this...
str controls = "5 6 9 10 12 11 13"
str a b c d e e5 e6 c9Cas c10Who c12Rep c11Mul c13Use
int u v w x y z
c13Use = 1
out c13Use
if(!ShowDialog("Live_Search_and_Replace" &Live_Search_and_Replace &controls)) ret
but here it did...
str controls = "5 6 9 10 12 11 13"
str e5 e6 c9Cas c10Who c12Rep c11Mul c13Use
int u v w x y z
c13Use = 1
out c13Use
if(!ShowDialog("Live_Search_and_Replace" &Live_Search_and_Replace &controls)) ret
i guess i shouldn't put those variables in front of the dialog's variables. :oops:
Posts: 12,041
Threads: 140
Joined: Dec 2002
Yes, don't modify the str... lines inserted by the dialog editor. I'll add a comment, thank you.