Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - Minor problem with "ReplaceSel" and undo
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Minor problem with "ReplaceSel" and undo

 Post Reply Post Reply
Author
Message
peerschindel View Drop Down
Groupie
Groupie


Joined: 12 July 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote peerschindel Quote  Post ReplyReply Direct Link To This Post Topic: Minor problem with "ReplaceSel" and undo
    Posted: 21 July 2008 at 9:58am
Hi all,
 
I have faced a minor problem (to not call it bug) with "ReplaceSel".
If I call it several times (which I do in our software to insert some texts
to the edit control via menu items), then all is treated as ONE undo
event (and not as several ones).
This is in contrast to ordinary paste from clipboard where I can undo each
event separately.
 
The reason is, that "ReplaceSel" calls
  InsertString(szNewText, GetCurrentDocumentRow(), m_nCurrentCol,
  TRUE);
with the last parameter "TRUE" while "Paste" calls it with
  m_Selection.IsSelExist()
It would be nice, if this could be made constistent to make it more
convenient for future releases.
In the meantime for me it's no problem to make my own version of
"ReplaceSel" with the change. It's just that I want to help
to improve the SyntaxEdit control to make it even better than
it is already
 
Regards
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.