Retrieving List of installed conponents like CulturInfo, Fonts etc. possible ?

M

Mark Johnson

I would like to write a Programer Tool to test a DateTimePicker with
CultureInfo and Font support.

On the Desktop this is not a problem using:
- cia_CultureInfo =
CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures);
- FontDialog

For the GetCultures I have developed a rather messy way of retieving the
valid CultureInfos.
but now I see that the FontDialog is also not supported (sigh) ...

Since the System knows what is installed, this Information must be stored
somewhere.

Maybe a Registry entry ? (a quick look at the XP-Registry found nothing
usefull).

And while we are talking about Fonts : another question :

Being a fan of "Comic Sans MS" and a big reader of books on my PDA,
I installed my (German) comic.TTF and comicbd.TTF to the Windows\Fonts
(Schriftarten) directory
and the MS-Reader .lit file's where I had written the HTML to use "Comic
Sans MS" used the Font correctly
on my (German) XDA I - Pocket PC 2002 mashine.

When a friend (Alan) of mine from Kentucky arrived last September we tried
this on his iPAC (?) with Pocket PC 2003
and everything failed - Microsoft Reader opened one of my .lit files and
showed no text at all.
Even one of Alan's book's that worked before showed no text at all.

After deleting the font and rebooting everything worked as before.

Alan tried this at home with a US-Version of the "Comic Sans MS" Font (just
in case this was Culture-dependent) with the same results.

Is this a known problem?
Maybe Pocket PC 2003 specific ?
Has somebody tried this on the XDA II ?

Mark Johnson, Berlin Germany
(e-mail address removed)
 
F

Fernando

Hi Mark,

For the list of cultures installed on the device you can pinvoke to the
WinCE native function:

BOOL EnumSystemLocales(
LOCALE_ENUMPROC lpLocaleEnumProc,
DWORD dwFlags
);

For info on this API, take a look at -->
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcelocal/ht
ml/cerefenumsystemlocales.asp
For an introduction to P/Invoke on NETCF -->
http://msdn.microsoft.com/mobility/understanding/articles/default.aspx?pull=
/library/en-us/dnnetcomp/html/netcfintrointerp.asp?frame=true

Hope this helps,
Fernando

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Mark Johnson" <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Subject: Retrieving List of installed conponents like CulturInfo, Fonts
etc. possible ?
| Date: Wed, 18 Feb 2004 08:00:35 +0100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Lines: 48
| Message-ID: <[email protected]>
| Organization: Arcor
| NNTP-Posting-Date: 18 Feb 2004 08:00:36 MET
| NNTP-Posting-Host: 213.23.141.126
| X-Trace:
DXC=i05WV5l<0d;gL1_>^S7Mi=:ejgIfPPld4jW\KbG]kaM8DAHcn;Zl5e8h]k7bUNB>d1KgWG2b
RR9h>SjDVI>0cQc8a^d=nQYC>P7
| X-Complaints-To: (e-mail address removed)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed.tiscali.ch!feed1.news
be.easynet.net!newsfeed.arcor-online.net!newsread.arcor-online.net!news.arc
or.de!not-for-mail
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:46035
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I would like to write a Programer Tool to test a DateTimePicker with
| CultureInfo and Font support.
|
| On the Desktop this is not a problem using:
| - cia_CultureInfo =
| CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures);
| - FontDialog
|
| For the GetCultures I have developed a rather messy way of retieving the
| valid CultureInfos.
| but now I see that the FontDialog is also not supported (sigh) ...
|
| Since the System knows what is installed, this Information must be stored
| somewhere.
|
| Maybe a Registry entry ? (a quick look at the XP-Registry found nothing
| usefull).
|
| And while we are talking about Fonts : another question :
|
| Being a fan of "Comic Sans MS" and a big reader of books on my PDA,
| I installed my (German) comic.TTF and comicbd.TTF to the Windows\Fonts
| (Schriftarten) directory
| and the MS-Reader .lit file's where I had written the HTML to use "Comic
| Sans MS" used the Font correctly
| on my (German) XDA I - Pocket PC 2002 mashine.
|
| When a friend (Alan) of mine from Kentucky arrived last September we tried
| this on his iPAC (?) with Pocket PC 2003
| and everything failed - Microsoft Reader opened one of my .lit files and
| showed no text at all.
| Even one of Alan's book's that worked before showed no text at all.
|
| After deleting the font and rebooting everything worked as before.
|
| Alan tried this at home with a US-Version of the "Comic Sans MS" Font
(just
| in case this was Culture-dependent) with the same results.
|
| Is this a known problem?
| Maybe Pocket PC 2003 specific ?
| Has somebody tried this on the XDA II ?
|
| Mark Johnson, Berlin Germany
| (e-mail address removed)
|
|
|
|
|
 
M

Mark Johnson

Looks very confusing I am afraid (one reason I hated these C++ things).
I can't see what/where is being retrieved or how.
It looks as if the callback uses the LocaleString that I don't have/trying
to find out
or
is this string address where the LocaleString be put ?? >>
EnumSystemLocales(MyProc,LCID_INSTALLED);

No, I'm afraid I don't understand this.

How do you use it to retrieve an int[] of LCID or string[] of LocaleStrings
of the LCID_INSTALLED.

Mark Johnson, Berlin Germany
(e-mail address removed)
 
Top