Re: display unicode db text in visual C++ mfc ide 2003
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Mon, 11 Dec 2006 01:10:45 -0500
The problem is that you need to show it in the caption bar. If you were showing it in an
edit control it would be easier.
There's no easy way. You could consider that at the interfaces to older code you convert
from Unicode to MBCS. Unfortunately, this could be a real royal pain.
joe
On Sun, 10 Dec 2006 13:37:00 -0800, .asahan <asahan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi again,Joseph M. Newcomer [MVP]
I think you misunderstood me a bit. I can make the system enabled to show
arabic text-data by changing locales.
My question is:
The active input locale will be in ENglish in OS-XP environment. Then my mfc
program (built in vs.2003 ide) will be running. This program will read arabic
text from database (using CDatabase/Crecordset) and will show it on a dialog
(title bar). Moreover, because of the integration to old programs, I have to
compile this program in mbcs mode. That is my problem.
"Alexander Grigoriev" wrote:
I think Hebrew/Arabic capability is included with every kind of XP (as well
as Chinese, Korean, Japanese), but not installed by default.
This is not your grandfather's Windows 95!
"Kurt Grittner" <grittkmg_NO_SPAM_@xxxxxxxxxxx> wrote in message
news:8k7jn2982kvmmbqnfi8og43e44osll8cp2@xxxxxxxxxx
Hi Sahan,
I tore my hair out on this one time. This is the way it was at the
time that I ran into it (about 4 years ago). So it may have changed
since then.
1. Web browsers can show foreign languages.
2. There is a special version of Windows that is Hebrew/Arabic
capable. This version is different from standard Windows.
3. The various edit controls know enough that they shouldn't try to
make sense of the right-to-left text if they are part of the standard
windows, and they put up a message box that says "??" (not very
helpful).
4. The controls by the same name running in the Hebrew/Arabic version
of windows work fine.
5. When running the Hebrew/Arabic version of windows there is a little
blue square on the taskbar which documents the current state of the
input cursor. When this is set to EN-glish then anything you type
expands from the caret to the right. When it is in the AR-abic mode,
then anything you type expands from the caret to the left unless what
you are typing is a series of digits and then it expands to the right
after all.
6. MS-Word, MS-Excel, Wordpad, Notepad, et al all work in this way.
So to summarize, you could just use standard windows and send your
text to a web browser with the proper code-page or you could run your
application on the Hebrew/Arabic version of windows (Yes you do have
to pay for another copy of windows).
Hope this helps you,
-Kurt
On Thu, 7 Dec 2006 12:01:00 -0800, .asahan
<.asahan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I have a program that reads data in arabic language from database. I see
text as arabic in database. However, When I try to read it using MFC
database
classes, it is coming in not readable format. I don't want to use UNICODE
macro in program because there are many other integrated programs and
they
are aware of char and constant char types. I only would like to read this
arabic text in that portion of program.
I tried MultiByteToWideChar function for conversion. However, it didn't
work well. I am also suspicious about displaying, because even if the
conversion is successful, How can I see the real arabic text during
run-time?
How can I do it? If you help me I'll be appreciate.
A.Sahan
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Re: display unicode db text in visual C++ mfc ide 2003
- From: Kurt Grittner
- Re: display unicode db text in visual C++ mfc ide 2003
- From: Alexander Grigoriev
- Re: display unicode db text in visual C++ mfc ide 2003
- From: .asahan
- Re: display unicode db text in visual C++ mfc ide 2003
- Prev by Date: Re: display unicode db text in visual C++ mfc ide 2003
- Next by Date: Re: Repaint issue in Full Screen Dialog Application on XP Home
- Previous by thread: Re: display unicode db text in visual C++ mfc ide 2003
- Next by thread: Is there a way of using EM_STREAMIN to load a file into a rich edit control of another application?
- Index(es):
Loading