views:

57

answers:

1

I have a dialog-based app with an edit-control in it. When I minimize / restore the app, everything's ok. But when I hide all the windows with holding down that Windows-logo-key and pressing "D" and then I restore the app, the edit-control selects everything inside it.

How to make it not to select the text on restore?

A: 

Try to look at WM_GETDLGCODE and DLGC_HASSETSEL in MSDN.

VitalyVal
I subclassed the edit control and cleared that DLGC_HASSETSEL bit. But I also read that it is somehow possible to do without subclassing? How to stop the "default container processing suchas dialog management code"?
Lars Kanto
"I subclassed the edit control and cleared that DLGC_HASSETSEL bit." - Do all work as supposed?"But I also read that it is somehow possible to do without subclassing? How to stop the "default container processing such as dialog management code"?" - I do not know. You can try to watch messages for the edit control and dialog using Spy.
VitalyVal
Yes, when subclassed, it works...
Lars Kanto