"Start" button handle + Win 7 + Language independent.

Hi,

Sorry if this the wrong group , but couldn’t find any OSR group for Win32.

I need to get handle to the “Start” button for Win 7 OS. On browsing the net I found this piece of code:
hStart = ::FindWindowEx(GetDesktopWindow(), NULL, “Button”, “Start”);

But this doesn’t work in other languages where “Start” string is replaced by some local string. for e.g Russian OS .

Please can you share some suggestions as to how to get handle to “Start” button which is valid across all languages.

Thanks .
Alan Hopes.

> Sorry if this the wrong group ,

You seem to realize that you are asking a question in a NG for which it is a totally OT issue, but still you do it.

Look - you have pretty much the same chance of getting an answer to your question if ask it on a Linux kernel list, or, maybe, in some NG where purely functional languages like Haskel are discussed. I just wonder about the logic behind this approach - it is pretty much like knocking on the door when you know for sure that no one is in.

but couldn’t find any OSR group for Win32.

…because Win32 is totally OT issue for OSR. Why don’t you want to ask your question in MSFT NGs
like VC and friends - IIRC, there are plenty of them???

Anton Bassov

xxxxx@gmail.com wrote:

I need to get handle to the “Start” button for Win 7 OS. On browsing the net I found this piece of code:
hStart = ::FindWindowEx(GetDesktopWindow(), NULL, “Button”, “Start”);

But this doesn’t work in other languages where “Start” string is replaced by some local string. for e.g Russian OS .

Please can you share some suggestions as to how to get handle to “Start” button which is valid across all languages.

There is no automatic way. I believe the start button is always the
first child of the tray window, so perhaps you could find Shell_TrayWnd
by class name, then enumerate its first child.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

It will work just fine if you replace the literal string with a string
called, say IDS_START, and have it appear in the language-specific
STRINGTABLE resource.

If you don’t understand what this means, go do some research. Also,
Microsoft has Win32 newsgroups, you shpuld ask this kind of question
there.

Also your app should be Unicode, because trying to localize
8-bit-character apps is a losing proposition.
joe

Hi,

Sorry if this the wrong group , but couldn’t find any OSR group for Win32.

I need to get handle to the “Start” button for Win 7 OS. On browsing the
net I found this piece of code:
hStart = ::FindWindowEx(GetDesktopWindow(), NULL, “Button”, “Start”);

But this doesn’t work in other languages where “Start” string is replaced
by some local string. for e.g Russian OS .

Please can you share some suggestions as to how to get handle to “Start”
button which is valid across all languages.

Thanks .
Alan Hopes.


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer