Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 2:44
David Crow28-Sep-06 2:44 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs27-Sep-06 11:42
lctrncs27-Sep-06 11:42 
GeneralRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 2:46
David Crow28-Sep-06 2:46 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs28-Sep-06 3:54
lctrncs28-Sep-06 3:54 
GeneralRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 4:07
David Crow28-Sep-06 4:07 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs28-Sep-06 7:10
lctrncs28-Sep-06 7:10 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 7:44
David Crow28-Sep-06 7:44 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs28-Sep-06 10:15
lctrncs28-Sep-06 10:15 
It does appear as if we are having trouble communicating...

DavidCrow wrote:
This appears to be the root of the confusion. For a combobox having the CBS_DROPDOWNLIST style, there is no edit control. It's actually a static control.


In Drop List style, the edit box does not go away.

It is still there but it is static and will not accept user text and a mouse click opens the dropdown. When you select an item in the dropdown, the control inserts the text you selected (apparently employing SelectString and WM_SETTEXT) into the now "static" edit box (one would think if it were truly static that it would not change ata all).

It is this inserted text I hope to clear in Drop List style.



DavidCrow wrote:
What control is this message targeted for?


According the Spy++, the CCombobox control sends the WM_SETTEXT message as the last event in my OnSelchange function. Since the message begins with "WM_, I believe that means that it is a windows message, and I assume that it is sent to the parent dialog in which the combobox control exists and plays a role in the painting of the text in the control's edit box.


DavidCrow wrote:
Is the edit box a separate control that you are updating based on the combobox selection?


You appear to suggest that the edit box associated with the combobox we have been discussing becomes a separate control when it is in Drop List mode.

I suppose that it is possible for the edit box to change to a different control when one changes the control's style, but I find it difficult to believe that just changing a combobox's style turns it into two separate controls.

Thank you for all your assistance. I have managed to find a satisfactory workaround using the DropDown style. While I would prefer to use the Drop List, I can live with what I have now - and will revisit this problem again later.

Thanks again.

"For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." Richard Feynman, Minority Report to the Official Report on the Space Shuttle Challenger Crash

GeneralRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 10:34
David Crow28-Sep-06 10:34 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs28-Sep-06 12:46
lctrncs28-Sep-06 12:46 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow29-Sep-06 2:40
David Crow29-Sep-06 2:40 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs29-Sep-06 5:11
lctrncs29-Sep-06 5:11 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow29-Sep-06 5:18
David Crow29-Sep-06 5:18 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs29-Sep-06 5:44
lctrncs29-Sep-06 5:44 
GeneralRe: Clearing the edit box in ccombobox Pin
Zac Howland29-Sep-06 3:40
Zac Howland29-Sep-06 3:40 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs29-Sep-06 5:19
lctrncs29-Sep-06 5:19 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow29-Sep-06 5:59
David Crow29-Sep-06 5:59 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs29-Sep-06 6:31
lctrncs29-Sep-06 6:31 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow29-Sep-06 6:02
David Crow29-Sep-06 6:02 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs29-Sep-06 6:49
lctrncs29-Sep-06 6:49 
GeneralRe: Clearing the edit box in ccombobox Pin
David Crow29-Sep-06 7:14
David Crow29-Sep-06 7:14 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs29-Sep-06 11:20
lctrncs29-Sep-06 11:20 
GeneralRe: Clearing the edit box in ccombobox Pin
David Crow2-Oct-06 2:44
David Crow2-Oct-06 2:44 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs2-Oct-06 5:13
lctrncs2-Oct-06 5:13 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow2-Oct-06 6:07
David Crow2-Oct-06 6:07 

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.