I wanted to disable a text box (greying it and disabling input) so I used SetWindowLong to add the WS_DISABLED style flag. It has the effect of not allowing writes on the text box but it didn't grey it out. Anyone know how I can do this?

BTW I also tried the ES_READONLY flag but it didn't have any effect, unlike WS_DISABLED, which at least disables the ability to write on the text box!
Posted on 2002-11-11 09:09:11 by Knightmare

invoke EnableWindow, hEdit, FALSE

Posted on 2002-11-11 09:15:03 by Mirno
Thnx, that's it :)
Posted on 2002-11-11 09:20:50 by Knightmare
Also you can use something like that:

invoke GetDlgItem, hWnd, 101

invoke SendMessage, eax, EM_SETREADONLY,TRUE,0
Posted on 2002-11-11 09:22:12 by masquer