Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Curious Uncode problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Curious Uncode problem

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


Joined: 10 March 2010
Location: South Africa
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phrediac Quote  Post ReplyReply Direct Link To This Post Topic: Curious Uncode problem
    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 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
Back to Top
Phrediac View Drop Down
Groupie
Groupie


Joined: 10 March 2010
Location: South Africa
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phrediac Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Phrediac View Drop Down
Groupie
Groupie


Joined: 10 March 2010
Location: South Africa
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phrediac Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.109 seconds.