Click here to Skip to main content
15,896,118 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Error on OLECHAR FAR* Pin
Small Rat27-Jul-03 11:17
Small Rat27-Jul-03 11:17 
QuestionHow to lock an edit box? Pin
Aidman27-Jul-03 5:26
Aidman27-Jul-03 5:26 
AnswerRe: How to lock an edit box? Pin
Beer2627-Jul-03 5:51
Beer2627-Jul-03 5:51 
GeneralRe: How to lock an edit box? Pin
peterchen27-Jul-03 8:32
peterchen27-Jul-03 8:32 
GeneralRe: How to lock an edit box? Pin
Beer2627-Jul-03 9:09
Beer2627-Jul-03 9:09 
GeneralRe: How to lock an edit box? Pin
peterchen27-Jul-03 9:45
peterchen27-Jul-03 9:45 
AnswerRe: How to lock an edit box? Pin
peterchen27-Jul-03 7:29
peterchen27-Jul-03 7:29 
AnswerRe: How to lock an edit box? Pin
Erik Funkenbusch27-Jul-03 13:54
Erik Funkenbusch27-Jul-03 13:54 
As others have mentioned, you use the EM_SETREADONLY message. However, this will cause the edit box to be grayed out. You can still select the text, copy it, etc..

If you want the control to look like a normal edit control, but be read-only, then you need to catch WM_CONTROLCOLOR and look for the controls window handle and return a brush that's the same as the users color preferences.

I'd advise against that, though. It confuses users when a control looks editable, but really isn't.


--
Where are we going? And why am I in this handbasket?
GeneralNeed help with progress bar Pin
Snyp27-Jul-03 3:31
Snyp27-Jul-03 3:31 
GeneralRe: Need help with progress bar Pin
User 665827-Jul-03 3:42
User 665827-Jul-03 3:42 
GeneralNeed help saving.... Pin
Snyp27-Jul-03 3:19
Snyp27-Jul-03 3:19 
GeneralRe: Need help saving.... Pin
Beer2627-Jul-03 3:50
Beer2627-Jul-03 3:50 
GeneralRe: Need help saving.... Pin
Bob Stanneveld27-Jul-03 8:01
Bob Stanneveld27-Jul-03 8:01 
GeneralHyperthreading Pin
ColinDavies27-Jul-03 0:56
ColinDavies27-Jul-03 0:56 
GeneralRe: Hyperthreading Pin
Michael Dunn27-Jul-03 1:05
sitebuilderMichael Dunn27-Jul-03 1:05 
GeneralRe: Hyperthreading Pin
Ryan Binns27-Jul-03 4:50
Ryan Binns27-Jul-03 4:50 
GeneralRe: Hyperthreading Pin
ColinDavies27-Jul-03 22:34
ColinDavies27-Jul-03 22:34 
GeneralRe: Hyperthreading Pin
wb27-Jul-03 4:47
wb27-Jul-03 4:47 
GeneralRe: Hyperthreading Pin
ColinDavies27-Jul-03 22:40
ColinDavies27-Jul-03 22:40 
GeneralDifference between System process and Administrator process Pin
Hashim Saleem27-Jul-03 0:46
Hashim Saleem27-Jul-03 0:46 
GeneralRe: Difference between System process and Administrator process Pin
Michael Dunn27-Jul-03 0:50
sitebuilderMichael Dunn27-Jul-03 0:50 
GeneralRe: Difference between System process and Administrator process Pin
Hashim Saleem27-Jul-03 1:15
Hashim Saleem27-Jul-03 1:15 
GeneralRe: Difference between System process and Administrator process Pin
Michael Dunn27-Jul-03 2:10
sitebuilderMichael Dunn27-Jul-03 2:10 
Generalactivex container test with my project Pin
shinay26-Jul-03 22:58
shinay26-Jul-03 22:58 
Questionrebuild all? Pin
novachen26-Jul-03 22:48
novachen26-Jul-03 22:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.