Click here to Skip to main content
15,888,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello , I have a edit control in Win32 API C++ in VS2008 and I want to add text without the previous text inserted losses.Please help me someone quickly
Posted
Updated 13-Oct-11 8:11am
v2
Comments
DaveAuld 13-Oct-11 14:12pm    
Don't put Urgent , Quickly or any other form of hurry up.........its rude, this is not a paid service, and it is of no urgency to anyone but you. You are less likely to get a response if you use this approach. Thanks.

1 solution

Try the following:
C++
// get the initial text length
int nLength = edit.GetWindowTextLength();

// put the selection at the end of text
edit.SetSel(nLength, nLength);

// replace the selection
edit.ReplaceSel(pszText);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900