Post by MikeDFor clarity's sake, let's use the term "intrinsic" for VB controls and
"native" for Windows controls.
"Intrinsic" was the word I was looking for, thank you (English isn't my
native language).
Post by MikeDI've always believed (never had a need yet to have to use unicode in VB,
so I have practical experience and am more/less just guessing at all of
this) that the problem with using unicode in VB's intrinsic controls
wasn't with the control itself. After all, VB creates them from
Windows' native controls (VB's TextBox is actually Windows' Edit
control). That's why you can change styles and send EM_ messages and
respond to messages via subclassing. The "problem" is VB itself: it
converts unicode to ANSI (or vice-versa as the case may be). So, when
you assign a unicode string to a Textbox's Text property, VB converts
that string to ANSI. I would guess that if you *solely* use the API with
VB's intrinsic controls, you might be able to utilize unicode.
You're on the right track. Under the hood, the intrinsic controls indeed
are native controls. BUT: As you probably know, you can create ANSI
windows and Unicode windows. ANSI windows are created through
CreateWindowExA and have an ANSI message handling routine (e. g.
DefWindowProcA). Unicode windows are created through CreateWindowExW and
have a Unicode message handling routine (DefWindowProcW).
VB6 creates ANSI windows, that's the main reason why it doesn't support
Unicode and why it won't work to make an intrinsic control support
Unicode. My controls create Unicode windows.
To make this topic more complicated: Internally, Windows creates all
windows as Unicode windows. But it does string conversion for the ANSI
versions of the API functions. So while each window actually is a
Unicode window, those that have been created through the ANSI versions
of the API functions, are presented as ANSI windows.
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."