Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog checkbox initialized value
#1
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.
A new blog on QM coding and automation.

The Macro Hook
#2
Assign 1 to the variable.
#3
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?
A new blog on QM coding and automation.

The Macro Hook
#4
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 ...
#5
yep that's what i needed. i got it to work but here's why.

it didn't work when i had this...

Code:
Copy      Help
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...
Code:
Copy      Help
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:
A new blog on QM coding and automation.

The Macro Hook
#6
Yes, don't modify the str... lines inserted by the dialog editor. I'll add a comment, thank you.


Forum Jump:


Users browsing this thread: 1 Guest(s)