Print Page | Close Window

Curious Uncode problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=23230
Printed Date: 18 April 2024 at 6:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Curious Uncode problem
Posted By: Phrediac
Subject: Curious Uncode problem
Date Posted: 24 December 2016 at 9:36am
I am using a ReportControl which requires Unicode.  The characters all display perfectly well.  To facilitate editing I need a custom context menu which will allow Unicode characters to be inserted (only 11 are used).  To do this I am using code found on  http://forum.codejock.com/forum_posts.asp?TID=14007&KW=InplaceEditHwnd&PID=48391&title=question-disable-contextmenu-on-string-items#48391" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=14007&KW=InplaceEditHwnd&PID=48391&title=question-disable-contextmenu-on-string-items#48391  which hooks the InplaceEditHwnd.

The popup works perfectly except for two problems:
1)  The ReportControl's CancelEdit even fires only intermittently
2)  Each Unicode character is replaced with a question mark (?) if EditMode is entered and exited.  What is particularly curious about this is that the question marks appear even if no changes are made to the text.  This happens only if the hook is applied.

One other peculiarity I noticed in the ReportControl while testing is that the ValueChanging event always fires, again, even if no changes have been made.

I would be grateful if anyone could explain why the Unicode characters are disappearing and even more grateful to someone who could suggest a way to counter it.


-------------
ActiveX 16.2.6
VB6 SP6
Win 7 (x64) Pro



Replies:
Posted By: Phrediac
Date Posted: 07 January 2017 at 8:48am
While trying to work around this problem by overlaying a FlatEdit control I discovered that the FlatEdit's Visible property cannot be changed during runtime.  When I checked the Help file to confirm that it is not Read-Only the Visible property is not even mentioned.  A rather curious omission.

-------------
ActiveX 16.2.6
VB6 SP6
Win 7 (x64) Pro


Posted By: Phrediac
Date Posted: 10 January 2017 at 4:48am
I have managed to fix the original problem - I was using SetWindowLongA where I should have used SetWindowLongW.

My machinations gave rise to another question, however:  Am I the only one who finds it insane that the KeyUp and KeyDown events are not triggered when the ReportControl is in EditMode?  Surely that is when they are needed most?


-------------
ActiveX 16.2.6
VB6 SP6
Win 7 (x64) Pro



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