Handle

How can I get the Handle of the start button according to what computer my program is run on?
bradsobleskyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chensuCommented:
Sorry, I don't understand your question.
0
kakamnaCommented:
what do u mean by what computer my program is run on?.
0
bradsobleskyAuthor Commented:
The handle to the start button on my computer is 00xC4 but it is not the same for every computer. So i want to detect the handle no matter what the computer.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

kakamnaCommented:
SO If u have some method to find the handle of the start button.
Then You should also know the Class name registered or the Window Name of the Start Button These are the members of the same window class which is registered for every window(button). So you should use the
FindWindow(Window Name,Window Class) function it will return you pointer to window and handle as well
0
chensuCommented:
HWND hWnd = ::FindWindow(_T("Shell_TrayWnd"), NULL);
0
xflmlowCommented:
No offence Chensu, but bradsoblesky was trying to obtain a handle
the Start button only, not the entire taskbar.
0
chensuCommented:
Yeah, I knew that. But it is probably what bradsoblesky wants.
0
bradsobleskyAuthor Commented:
Call me Brad, and how is it that i can convert that to a string or char?
0
chensuCommented:
Convert what to a string or char?
0
kakamnaCommented:
DO U WANT TO CONVERT HANDLE TO CHAR OR STRING?. WOULD YOU PLEASE BE SPECIFIC.
0
bradsobleskyAuthor Commented:
I don't know what the heck i'm talking about, i wan't to be able to conver the 00xC4 of my 'start menu' to a CString. I'm not sure whether that is the handle or the window or the class or what it is but i want to get that and then convert it to a CString.
0
chensuCommented:
Do you mean you want a CString which is "0xC4"?

HWND hWnd = 0xC4;
CString str;
str.Format(_T("0x%X"), (DWORD)hWnd);
0
bradsobleskyAuthor Commented:
Lock it up chensu, and thanks for the help. You're the man!!
0
chensuCommented:
Thank you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.