CEdit style in a CComboBox control 
Author Message
 CEdit style in a CComboBox control

All,

I can get a pointer to a CEdit control with the following code...

 CEdit* Edit;
 Edit=(CEdit*)m_ComboBox.GetDlgItem(1001);

Is there any way to change the CEdit control style after it is already
created??

I want to add the "ES_NOHIDESEL" style.

                       Thanks Todd



Fri, 23 Apr 2004 23:43:45 GMT  
 CEdit style in a CComboBox control
Ouch! You have hardcoded the control number and actually used GetDlgItem! Instead, create
a control member variable in your class; it will be bound to the control directly. How you
knew 1001 was correct would be a matter of some concern.

However, the Bad News is that the ES_NOHIDESEL style cannot be changed after the edit
control is created.
                        joe

Quote:

>All,

>I can get a pointer to a CEdit control with the following code...

> CEdit* Edit;
> Edit=(CEdit*)m_ComboBox.GetDlgItem(1001);

>Is there any way to change the CEdit control style after it is already
>created??

>I want to add the "ES_NOHIDESEL" style.

>                       Thanks Todd

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Sun, 25 Apr 2004 11:26:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CComboBox : Adding New Items from the built in CEdit Control

2. Changing the style of a CEdit control

3. Changing font style in CEdit derived control.

4. Enable enter key in a ccombobox or cedit .

5. CComboBox with Dropdown style

6. simple CEdit and CComboBox question

7. CComboBox in place of CEdit in a CTreeCtrl

8. UpdateData while typing in CEdit or CComboBox in formview

9. CComboBox item color/style

10. Changing styles of CComboBox

11. Problem using the CEdit inside a CComboBox

12. How to change the style of a CComboBox???????

 

 
Powered by phpBB® Forum Software