Further sub-classing of CEdit
-
I'm working on a CEdit derived class that requires that I put a bit of text in the window on creation. I'm doing this in PreSubclassWindow, which may or not be the right place for it but it works. The problem I'm running into is the cursor positioning. If I use SetSel(0,0) in PreSubclassWindow the text ends up being completely highlighted. For the moment I've included a SetSel in the SetFocus handler. But this isn't practical long term. Without any attempt at setting the position selector I still get a completely highlighted edit space. Where would be the best place to set the original position? Thanks, Lilith
-
I'm working on a CEdit derived class that requires that I put a bit of text in the window on creation. I'm doing this in PreSubclassWindow, which may or not be the right place for it but it works. The problem I'm running into is the cursor positioning. If I use SetSel(0,0) in PreSubclassWindow the text ends up being completely highlighted. For the moment I've included a SetSel in the SetFocus handler. But this isn't practical long term. Without any attempt at setting the position selector I still get a completely highlighted edit space. Where would be the best place to set the original position? Thanks, Lilith
This could help you... http://www.codeproject.com/script/comments/forums.asp?forumid=1647&df=100&mpp=50&fr=51#xx1339509xx[^]
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose: