Print Page | Close Window

Minor problem with "ReplaceSel" and undo

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=11513
Printed Date: 04 December 2024 at 4:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Minor problem with "ReplaceSel" and undo
Posted By: peerschindel
Subject: Minor problem with "ReplaceSel" and undo
Date 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
 
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net