Thread View: borland.public.cppbuilder.nativeapi
6 messages
6 total messages
Started by Mike Collins
Tue, 22 Aug 2006 12:03
Windows Language dectection
Author: Mike Collins
Date: Tue, 22 Aug 2006 12:03
Date: Tue, 22 Aug 2006 12:03
22 lines
1896 bytes
1896 bytes
Hi guys just a real quick one - I have a function that needs to locate a specific window that is created by the system. Currently i'm using EnumDesktopWindows and looking for a specific ClassID and Caption. The class id is #32770 - which is the same for all dialogs so i can't use this for uniqueness hence the fact that i'm having to examine the Caption. One of our beta testers in sweden has reported a bug which is actually being caused because i'm only looking for the English caption. So basically, what is the easiest way to determine which language is begining used by Windows. Secondly what is the quickest was to determine what Microsoft uses for this particular dialogs caption, without having to switch between every since langiage. Is there a cental language file that can be examine? Any pointers would be most helpful - i've already impli,mented our own langugae idimendance within the applicaiton - i just need to consider this bug now. Many thanks
Re: Windows Language dectection
Author: Remy Lebeau (TeamB)
Date: Tue, 22 Aug 2006 17:35
Date: Tue, 22 Aug 2006 17:35
21 lines
1464 bytes
1464 bytes
"Mike Collins" <its@TheBottomOfThePost.com> wrote in message news:44eaf27f$1@newsgroups.borland.com... > what is the easiest way to determine which language is begining used by Windows. GetUserDefaultLangID() GetUserDefaultLCID() GetSystemDefaultLangID() GetSystemDefaultLCID() GetThreadLocale() > what is the quickest was to determine what Microsoft uses for this particular dialogs caption That depends on which dialog in which application you are actually looking at. Please provide more details. Gambit
Re: Windows Language dectection
Author: Mike Collins
Date: Tue, 22 Aug 2006 17:55
Date: Tue, 22 Aug 2006 17:55
39 lines
2141 bytes
2141 bytes
Thanks Remy, i'm trying to identify the Logon dialog i.e. "Log On to Windows" Based on this, i would assume that i need to use the GetSystemDefaultLangID(), GetSystemDefaultLCID() as user preferred languages would not be applicable at this point. On the surface this topic seems relatively simple but after reading the MSDN articles i can see it turning into a pretty complex problem. What would your advice be on this topic? Thanks again, Mike "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:44eb4100$3@newsgroups.borland.com... > > "Mike Collins" <its@TheBottomOfThePost.com> wrote in message > news:44eaf27f$1@newsgroups.borland.com... > >> what is the easiest way to determine which language is begining used by > Windows. > > GetUserDefaultLangID() > GetUserDefaultLCID() > GetSystemDefaultLangID() > GetSystemDefaultLCID() > GetThreadLocale() > >> what is the quickest was to determine what Microsoft uses for this > particular dialogs caption > > That depends on which dialog in which application you are actually looking > at. Please provide more details. > > > Gambit > >
Re: Windows Language dectection
Author: Remy Lebeau (TeamB)
Date: Tue, 22 Aug 2006 22:29
Date: Tue, 22 Aug 2006 22:29
16 lines
1703 bytes
1703 bytes
"Mike Collins" <its@TheBottomOfThePost.com> wrote in message news:44eb4515@newsgroups.borland.com... > i'm trying to identify the Logon dialog i.e. "Log On to Windows" I'm curious as to why. One thing to keep in mind is that on NT-based systems, that dialog is controlled on a completely separate workstation and desktop then the one the logged-in user interacts with. Also, that dialog is controlled by the GINA system. What EXACTLY are you trying to do with the dialog? If you want to customize the dialog, you would have to write your own GINA DLL. If you are just trying to detect whether the dialog is visible, it is easier to check if the "WinLogon" desktop is active instead. Gambit
Re: Windows Language dectection
Author: Mike Collins
Date: Wed, 23 Aug 2006 10:46
Date: Wed, 23 Aug 2006 10:46
51 lines
3520 bytes
3520 bytes
Sorry for my vagueness - it just didn't seem relevant at the time so I didn't want to complicate the topic. As you will probably know from my previous posts I do have a GINA based project and application. The point at which I'm enumerating the desktop windows is from with a gina-stub so it effectively has access to the winlogon desktop and thus the dialogs. There are certain situations where the system / winlogon does respond to the SAS notification (C+A+D or custom) - for example, if you have the logon prompt displayed and you press C+A+D nothing happens. However there are certain circumstances within our product where I need to force the closing of this dialog. This is just a very tiny aspect of the overall product. I could explain the full extent of this but I'd be here for ages and it would disclose the full workings of our product :-( - I'm happy to do this in a private e-mail if your really interested... Suffice to say, the only way I can find of closing this dialog is to enum the windows, get the handle of the dialog and then post a message to it. The English version works fine because I know the caption to look for. However I have key issues when the product is deployed on systems with alternative languages. My basic thinking is to check the LCID and then I know what string to look for. This is the basic idea but it is proving more problematic than I though. DO you have any suggestions or pointers on the best or easiest course of action here? Many thanks again, if you need my e-mail it's on the BCBjournal web site. Mike C "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:44eb85db$1@newsgroups.borland.com... > > "Mike Collins" <its@TheBottomOfThePost.com> wrote in message > news:44eb4515@newsgroups.borland.com... > >> i'm trying to identify the Logon dialog i.e. "Log On to Windows" > > I'm curious as to why. One thing to keep in mind is that on NT-based > systems, that dialog is controlled on a completely separate workstation > and > desktop then the one the logged-in user interacts with. Also, that dialog > is controlled by the GINA system. What EXACTLY are you trying to do with > the dialog? If you want to customize the dialog, you would have to write > your own GINA DLL. If you are just trying to detect whether the dialog is > visible, it is easier to check if the "WinLogon" desktop is active > instead. > > > Gambit > >
Re: Windows Language dectection
Author: Remy Lebeau (TeamB)
Date: Wed, 23 Aug 2006 17:52
Date: Wed, 23 Aug 2006 17:52
17 lines
1661 bytes
1661 bytes
"Mike Collins" <its@TheBottomOfThePost.com> wrote in message news:44ec31fa@newsgroups.borland.com... > The point at which I'm enumerating the desktop windows is from with > a gina-stub so it effectively has access to the winlogon desktop and > thus the dialogs. One thing you can try doing is to install a thread-specific CBT hook via SetWindowsHookEx() before displaying the dialog. Since you are writing your own GINA, you should be getting all of the notifications about when the dialog is about to appear and disappear. The hook can then tell you the HWND of all windows that are created and displayed on that thread. You won't need to know the captions for them. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads