I do this by first subclassing the window with SetWindowLongW then in
my new window procedure I trap WM_GETTEXT and WM_SETTEXT then pass
them directly to default window procedure rather than passing it to
vb6's window procedure. My concern is that vb6's window procedure is
ANSI while my new window procedure is UNICODE. I pass all the other
messages to vb6's window procedure by calling CallWindowProcA.
MSDN says "Windows NT/2000/XP: The CallWindowProc function handles
Unicode-to-ANSI conversion. You cannot take advantage of this
conversion if you call the window procedure directly." So my code
should work fine right? Will it work in Vista as well? Does anyone
think this code might have any problem? I could upload a sample if
needed for anyone.
- Kev
<swt...@gmail.com> wrote in message
news:bb04419d-583c-41fd...@l33g2000pri.googlegroups.com...
Thanks Kev. The file is located at http://www.savefile.com/files/2020518
.
Before you run the exe, please make sure of the following:
1. Have vb6 runtime files installed
2. Have Indic language group installed. The app will automatically
notify you if it isn't installed in your system. It will also tell you
where to install it from. If you have Vista Ultimate installed, you
shouldn't have a problem.
A screenshot in JPEG will be appreciated. Also let me know your OS
name and Edition (eg: Home Basic, Ultimate etc)
Thanks,
San
-San
Well, I guess I need to clarify something. I am more than happy to assist
one with their problems, but I won't run a compiled exe from someone I don't
know (I mean no offense by this). I thought you were going to show me a
project, which I would be happy to review. If something doesn't work, a
compiled exe won't tell me anything.
- Kev
I didn't send the project file because I thought VB6 IDE doesn't run
in Vista!
If you need it then here it is:
http://www.savefile.com/files/2021320
It does actually. Make sure you run the VB.exe as admin.
I'll look at this this afternoon!
- Kev
How long is it gonna take?
if you have how to then let me know
thanks a lot :)
;)
Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
Thanks a lot for the test. Anyway, to know more about how to add
UNICODE to your everyday vb6 apps, look no further than http://www.unisuite.com/
As you have had much experience in making UNICODE controls, could you
please test my code above and point flaws if any?
Thanks,
SanZB
I have played with Unicode few years back and haven't found a solution to
this problem except one from Woodbury but his control sells for 500$ + I
don't know how he did but he did.
the main problem is VB6 window is created using the ANSI function
CreateWindow not CreateWindowW so when we type a Unicode text, windows
automatically converts the Unicode text to ANSI and output becomes '???'
any workaround ?
i really need it :)
btw, i tried downloading lastest version of your controls and it gives me a
404.
Thanks Everyone.
> the main problem is VB6 window is created using the ANSI function
> CreateWindow not CreateWindowW so when we type a Unicode text, windows
> automatically converts the Unicode text to ANSI and output becomes '???'
>
> any workaround ?
This only is a problem if you use SendKeys or SendInput. I don't know a
workaround, but am looking for one, too.
> btw, i tried downloading lastest version of your controls and it gives me a
> 404.
I'll fix it, thanks.
Tested it on Vista, was not able to test on my main XP system. On XP it gave
me a error that the control is out of date.
---------------------------
Failed to load control 'TextBox' from EditCtlsU.ocx. Your version of
EditCtlsU.ocx may be outdated. Make sure you are using the version of the
control that was provided with your application.
---------------------------
> This only is a problem if you use SendKeys or SendInput. I don't know a
> workaround, but am looking for one, too.
Don't know about SendKeys, but for me your control is not not working. and I
used IME to enter the text, it still comes out as '???' I don't think its
because of font, as if its was because of font, I would have got squares.
What I am looking for is some workaround which allow me to type Unicode text
to VB6 textbox directly. instead of using any 3rd part control.
> Don't know about SendKeys, but for me your control is not not working. and I
> used IME to enter the text, it still comes out as '???' I don't think its
> because of font, as if its was because of font, I would have got squares.
Well, what shall I say? It works for me (Vista SP1) and you're the first
one reporting that he would get question marks when typing Unicode
characters into the control. Also I don't see how this could fail. It's
probably a configuration problem with your system or with your app.
> What I am looking for is some workaround which allow me to type Unicode text
> to VB6 textbox directly. instead of using any 3rd part control.
Can't the code posted by the thread-opener not be adopted to VB6
textboxes (I have not yet looked at the code)? Behind the scenes the VB6
textbox is just a native Edit control.
here is a screenshot.
http://img300.imageshack.us/img300/1675/40544225.jpg
"Timo Kunze" <TKunz...@gmx.de> wrote in message
news:eSaWYyan...@TK2MSFTNGP02.phx.gbl...
> Hindi. seems like your control cant take input in Indic languages. I
tested
> a few other Indic languages and they also seems to not work.
>
> here is a screenshot.
> http://img300.imageshack.us/img300/1675/40544225.jpg
Are you really sure that the font to which the control has been set does
support Hindi and Telugu? It looks as if the font is Vista's MS Sans Serif
which AFAIK doesn't support any indic script.
--
Thorsten Albers
albers (a) uni-freiburg.de
"Thorsten Albers" <alber...@THISuni-freiburg.de> wrote in message
news:O2f9Pkln...@TK2MSFTNGP05.phx.gbl...
Then the problem presumably is due to that you are using an IME for Hindi
and Telugu but not for Cyrillic, Japanese, etc.
Where how i tested-
I added keyboard for few languages like Russian, Japanese, Hindi, Thai. and
tested your control using the Language Toolbar aka IME and its does not
seems to
work. then I tested VBAccelator RichEdit control which is also Unicode
richtextbox, it comes up with *same* results.
But, using the same method I can perfectly type in windows notepad.
I don't know whats the problem is, may be because Indic are fairly new
inclusion in Unicode.
A small test shows that the problem is GetMessageA(). This ANSI
version of GetMessage() function is automatically included by vb6
application and is called in a message loop. So, whenever there is a
UNICODE character typed from keyboard, it converts to the infamous '?'
string to notify that this character cannot be shown. If you could
somehow reverse engineer your complied app to call GetMessageW()
(probably by modifying imports?), you should have no problem typing
any unicode charaters.
Checking imports from user32,dll by Timo's control seem to reveal that
UnregisterClassA() seems to have been called for RegisterClassExW().
Probably a leak? My copy is v1.3.0.102.
Check this test project out http://www.savefile.com/files/2029826.
Apologies for dirty coding.
Try changing 'GetMessageA' and 'DispatchMessageA' to 'GetMessageW' and
'DispatchMessageW'. Then try using IME. Whoila!
Then it would defeat the purpose of using IME to input unicode
characters! If everything is converted to ANSI, how can any unicode
character be ever typed using IME?
what are you trying to do?
I am myself trying to make Unicode controls for VB6. Label, Frame, Button,
Checkbox, RadioButton are done.
now making textbox, listbox and combobox.
--
Chint
So had luck with textboxes yet? For label controls, I just used
DrawTextW API on pictureboxes. What did u do for that?
Fortunately, my program yet doesn't need listboxes and comboboxes.
Unless you get ANSI apis to Wide versions, Timo's listboxes and
comboboxes controls may have the same problem, though I have not
tested this yet. Good Luck with your work.
-Sanje2v
btw, its that your real email ID, want to get in touch?
<swt...@gmail.com> wrote in message
news:3c28e2a8-619f-48c2...@x29g2000prf.googlegroups.com...