NO

Author Topic: TTN_GETDISPINFO not send  (Read 16031 times)

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: TTN_GETDISPINFO not send
« Reply #15 on: May 01, 2013, 10:34:46 PM »
Must be a font problem. Here it works...
Interesting, though, that it works for your tooltips.

czerny

  • Guest
Re: TTN_GETDISPINFO not send
« Reply #16 on: May 01, 2013, 10:54:58 PM »
Must be a font problem.
In wordpad and in word all the strings of your asc file are shown correctly, so it could not be a font problem.

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: TTN_GETDISPINFO not send
« Reply #17 on: May 02, 2013, 07:17:33 AM »
Slightly mysterious, but Unicode under Windows is very messy.

Can you display Chinese in a self-built Unicode control? E.g. by copying from Wordpad and pasting into the control?

> I have installed simsun.ttf and wordpad shows now the chinese chars while your application shows still strings of undef chars.

My app uses GetStockObject(ANSI_VAR_FONT) for the edit and static controls, and that works fine for Russian, Arabic and Chinese sets on my XP SP3 system with East Asian fonts enabled - you can even display all of them together.

In contrast, the ToolTips macro does not explicitly set a font, so the OS chooses what to use. Why tooltips work with your system but the edit control doesn't isn't clear to me.

I attach a modified version that sets "SimSun" instead of ANSI_VAR_FONT - see line 144. It allows to switch between SimSun and DEFAULT_GUI_FONT. Apparently, there is no UNICODE_VAR_FONT available...

Grateful for feedback from others, too.
« Last Edit: May 02, 2013, 07:23:35 PM by jj2007 »

czerny

  • Guest
Re: TTN_GETDISPINFO not send
« Reply #18 on: May 02, 2013, 08:00:13 PM »
I attach a modified version that sets "SimSun" instead of ANSI_VAR_FONT - see line 144. It allows to switch between SimSun and DEFAULT_GUI_FONT. Apparently, there is no UNICODE_VAR_FONT available...
It seems to me that the menu and the statusbar text is always DEFAULT_GUI_FONT.
The buttons and the label below the buttons are always SIMSUN.

The 'set font' button is only switching the editbox font.

The text is ok under the buttons and in the edit box with simsun and chinese. The tooltips are undef chars as before.
With simsun the text in other languages than chinese is ugly and for arabic only working for the tooltips.

czerny

  • Guest
Re: TTN_GETDISPINFO not send
« Reply #19 on: May 02, 2013, 08:07:46 PM »
Can you display Chinese in a self-built Unicode control?
No, I get undef chars.

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: TTN_GETDISPINFO not send
« Reply #20 on: May 02, 2013, 08:28:15 PM »
OK, I don't claim to be an expert for these things, but one likely scenario could be:

- it works on my system because Chinese fonts are enabled "OS-wide" (Khmer, for example, does not work for me - not part of the East Asian package)
- on your system, the fonts are not OS-wide installed, but after installation of simsun.ttf, controls show this font correctly if the font is explicitly set.

This does not solve the mystery why Russian and Arabic work for your tooltips, though.

Other ideas? It's not C or assembler-specific, I find it generically interesting why Unicode does not work properly a quarter century after its invention...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: TTN_GETDISPINFO not send
« Reply #21 on: May 02, 2013, 09:17:12 PM »
This does not solve the mystery why Russian and Arabic work for your tooltips, though.
use charmap.exe to look at fonts, russian and arabic codepages could be there in systems UNICODE fonts. Arial Unicode MS (arialuni.ttf) is interesting too.
« Last Edit: May 02, 2013, 09:28:03 PM by timovjl »
May the source be with you

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: TTN_GETDISPINFO not send
« Reply #22 on: May 03, 2013, 01:52:01 AM »
This does not solve the mystery why Russian and Arabic work for your tooltips, though.
use charmap.exe to look at fonts, russian and arabic codepages could be there in systems UNICODE fonts. Arial Unicode MS (arialuni.ttf) is interesting too.

Good hint indeed, thanks. I have invested some energy in this last version featuring a font dialog. Though it won't help to solve my mystery - even good ol' FixedSys displays all four languages flawlessly on my system...