Curious Uncode problem |
Post Reply |
Author | |
Phrediac
Groupie Joined: 10 March 2010 Location: South Africa Status: Offline Points: 16 |
Post Options
Thanks(0)
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 |
|
Phrediac
Groupie Joined: 10 March 2010 Location: South Africa Status: Offline Points: 16 |
Post Options
Thanks(0)
|
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 |
|
Phrediac
Groupie Joined: 10 March 2010 Location: South Africa Status: Offline Points: 16 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |