Disable controls in a dialog box via for loop

Started by bmclellan, December 12, 2018, 11:41:00 AM

Previous topic - Next topic

bmclellan

Hello,

Is it possible to disable dialog controls through a for loop of some kind?

I'm hoping there is some way I can query a control name based on the dialog control number to disable it:

i.e.    for xloop = 1 to DialogNumControls
             controlName = getControlName(Handle,xloop)
             DialogControlState(Handle,controlName,@dcsAddStyle,@csDisabled)
        next xloop


Sorry if it is in the Tech site somewhere, I searched on Dialog and disable and had so many hits I got lost!


Thanks
Barry

td

Check out the DialogProcOptions function in the Consolidated WIL Help file.  You can use the @dpoCtlName "event_code" to convert from number to name.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade