How to select text in CEdit Control
-
How can I select the text in a CEdit control. I have tried the SetSel(first_pos, last_pos) but the text don't be "blue". SetSel() works fine to cut or paste... but i want the text to be marked whit the blue line, as when using mouse. regards, Ola
-
How can I select the text in a CEdit control. I have tried the SetSel(first_pos, last_pos) but the text don't be "blue". SetSel() works fine to cut or paste... but i want the text to be marked whit the blue line, as when using mouse. regards, Ola
After the SetSel you need to do a SetFocus :-)
m_pedit.SetSel(1,10);
m_pedit.SetFocus();Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
After the SetSel you need to do a SetFocus :-)
m_pedit.SetSel(1,10);
m_pedit.SetFocus();Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
hmm... I still can't get the text marked blue. /Ola
-
hmm... I still can't get the text marked blue. /Ola
Then what color are they coming in? Or are you saying text is not even selected? And does the cursor start blinking in the edit box? Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
Then what color are they coming in? Or are you saying text is not even selected? And does the cursor start blinking in the edit box? Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
Text in edit box is not visible selected. Cursor starts blinking, and if I use m_editbox1.Cut(); text disappear. If I write some, text in edit box are not replaced. Code example: void CMyClass::OnSetfocusBox1() { m_box1.SetSel(1,10); m_box1.SetFocus(); // m_box1.Cut(); works, but text in box are never visable selected. } Ola