Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Shaterri

Disabled edit control still allows editing?

This topic is 6532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m currently working on the configuration dialog for the screensaver I''m putting together and I''ve run into a minor, but strange and frustrating, problem with it. I have an edit control that gets enabled or disabled according to other dialog box options; it works fine to the extent that the text is successfully greyed out (or ungreyed), but while the control is disabled and grey the user can still do all the usual editing within the text box: new keys, backspace, cut and pace, etc. I don''t have a code snippet handy at the moment, but does this sound like a familiar problem to anyone?

Share this post


Link to post
Share on other sites
Advertisement
Send the EM_SETREADONLY message to the edit control, with wParam set to TRUE, and lParam set to ''0'' (zero), set wParam to FALSE to turn it off, If that is what you have been doing and it has not been working, you may want to look into how you are creating the dialog box or edit control,..if you need any help with the above advice (like sending the message or finding the HWND for it, feel free to ask)




-Lucas
-Dieraxx@programmer.net

Share this post


Link to post
Share on other sites
No, the only message I''ve been sending to the control has been a WM_ENABLE message; everything I''ve read seemed to suggest that that was the only one that had to be sent. Do you really have to send WM_ENABLE _and_ EM_SETREADONLY? I can certainly try that... let you know how it works later (I''m still wrapping up at work here right now and all my code is at home)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!