disable combo box and checkbox during runtime

Does anyone know how I disable combo box and checkbox during runtime so they are not editable, and then enable them.

I try to send the msg READONLY like I use for edit box, but this doesn't work.

Any Ideas?

-bobby

Posted: Sat Jun 23, 2001 6:03 pm

by guy

PocketC doesn't have a function to call the Windows CE EnableWindow() function that lets you enable/disable controls.

There are two ways you can achieve the same effect:

1. Delete the control and recreate it but with the enable the way you want, then repeat later to change it back.

2. Create two identical controls in the same place, one enabled, one disabled, one visible, one not visible. When you want to change the enable state, hide one and show the other, then swap to change back.

You need to ensure that you copy the contents of the enabled controls into the disabled controls when you swap from the enable to disable state.

If you use option (1), you have to restore the contents when you recreate the enabled state.

Option 3:

Kevin - Please can we have an API for SetWindowLong() and EnableWindow().