From: Mihai N. on 26 Jan 2010 02:10 > I can fetch all information via the > Win32 API, except for the aforementioned four strings which constitute the > minimal information given in the LC_MESSAGES category. There is no supported way to get that info, you can stop looking. -- Mihai Nita [Microsoft MVP, Visual C++] http://www.mihai-nita.net ------------------------------------------ Replace _year_ with _ to get the real email
From: Pavel A. on 25 Jan 2010 15:30 Hmm, if this is is for posix compatibility, maybe somebody from MS Services for Unix could tell whether they implemented it? --pa "Corinna Vinschen" <corinna(a)community.nospam> wrote in message news:hjkf9c$79v$1(a)perth.hirmke.de... > Liviu wrote: >> "Pavel A." <pavel_a(a)12fastmail34.fm> wrote... >>> "Liviu" <lab2k1(a)gmail.c0m> wrote >>>> >>>> Maybe MessageBoxEx with MB_YESNO, then read the button texts >>>> within a hook (and drop the "&"s). >>> >>> Yep. This is exactly how I found these strings in user32.dll :) >> >> You must have done some additional debugging to trace the strings >> back to the source ;-) Anyway, quoting from your other post... >> >>>>> Look in string table resources of user32.dll. >>>>> "&Yes" is id=805, "&No" is id=806 (on XP SP3, x86) >>> [...] >>> The plain one-language system has only one variant of these >>> string resources >> >> ...confirmed here. FWIW on a brute force search in my us-en XP install >> I found just one system file with both yes/no and (fr) oui/non strings. >> That was msi.dll (part of windows installer), where "&Yes" is string #25 >> and "&No" #26. Both are localized in 36 other languages, even though no >> MUIs are installed (as well as some other common strings like OK, >> cancel, retry, ignore etc). To be very clear, I am not in any way >> recommending that one actually used those strings, relied on them >> even being there, or on the IDs staying the same between versions. > > That doesn't exactly look like the way to go. I'm looking for system > info in the style of GetLocaleInfo(Ex), which can be asked for on the > fly, independently of the system. The information given there is > usually available for all supported locales, whether or not the > languages are installed as GUI languages. Stuff like calling MessageBoxEx > is also not quite what I had in mind, given that I need the info in a > DLL which is usually running in CLI mode. Depending on the resource > number of a DLL which could change from system to system sounds a bit... > fragile. > > Last but not least I actually need four strings, two with the localized > default string for "Yes" and "No", and two with regular expressions > containing the localized pattern to recognize user input meaning "Yes" > and "No". For the English language for instance: "^[yY]" and "^[nN]". > > In case you're wondering what this is about, I'm searching the information > for the POSIX localization categories LC_COLLATE, LC_CTYPE, LC_MESSAGES, > LC_MONETARY, LC_NUMERIC, and LC_TIME. I can fetch all information via the > Win32 API, except for the aforementioned four strings which constitute the > minimal information given in the LC_MESSAGES category. > > Well, looks like I have to create a file-based solution with the > information fetched from some other source. > > > Corinna > > -- > Corinna Vinschen > Cygwin Project Co-Leader > Red Hat
From: Jonathan de Boyne Pollard on 26 Jan 2010 07:37 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <blockquote cite="mid:hjkf9c$79v$1(a)perth.hirmke.de" type="cite"> <p>Well, looks like I have to create a file-based solution with the information fetched from some other source.</p> </blockquote> <p>If you want not to reinvent some of that particular wheel, note that <a href="http://eduardocasino.es./freedos/country">the <code>COUNTRY.SYS</code> in FreeDOS</a> contains some of the data that you'll be wanting, as a "YESNO" table extension to the standard format.</p> </body> </html>
From: Corinna Vinschen on 26 Jan 2010 13:14 Jonathan de Boyne Pollard wrote: > [-- text/html, encoding 7bit, charset: ISO-8859-1, 17 lines --] ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ><html> ><head> > <meta content="text/html; charset=ISO-8859-1" > http-equiv="Content-Type"> ></head> ><body bgcolor="#ffffff" text="#000000"> ><blockquote cite="mid:hjkf9c$79v$1(a)perth.hirmke.de" type="cite"> > <p>Well, looks like I have to create a file-based solution with the >information fetched from some other source.</p> ></blockquote> ><p>If you want not to reinvent some of that particular wheel, note that ><a href="http://eduardocasino.es./freedos/country">the <code>COUNTRY.SYS</code> >in FreeDOS</a> contains some of the data that you'll be wanting, as a >"YESNO" table extension to the standard format.</p> ></body> ></html> Nice idea. I tend to fetch the locale data from GLibc and create a file from that using some shell or perl script. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat
From: Corinna Vinschen on 26 Jan 2010 13:17 Pavel A. wrote: > Hmm, if this is is for posix compatibility, maybe somebody from MS Services > for Unix > could tell whether they implemented it? There's not a lot of locale-specific data available in SFU. It's using a file-based approach as well, with the files stored in /usr/share/locale, afaics. However, since I can access the Win32 locale data, I just need the tiny bit of LC_MESSAGES info anyway. As I noted in another posting, I guess I'll look into the glibc locale data to create locale message files. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: SendMessage and PostMessage Next: Tanix - you generated a REAL BUG! |