I have a dynmaically sizing CEdit subclass too, and
your description sounds more or less like my code.
I don't have any problem with the caret on wraps
though. Instead of SetWindowPos(), I'm using
MoveWindow(ptNewLoc.x, ptNewLoc.y,
sizeNeeded.cx, sizeNeeded.cy, TRUE); // new size, force repaint
I hadn't figured out how to set the caret position when
this CEdit was created, however, so now I'm off to play
with SetSel…