Writing Windows Win32 application

I am new to windows programming.
I am trying to write an application to reorganize open(maximized) windows (like alt-tab) but in a fancy way.
Can some guru point me to some API, tutorial, samples for windows app/service development

- How to detect mouse position
- How to detect key stroke
- How to get all opened windows name, position and handle/pointer
- How to put active windows on top
- How to make a screen cap of the mini version of the windows

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.

mahesh1402IT ProfessionalCommented:
>>- How to detect mouse position

You may catch WM_MOUSEMOVE or may use API ::GetCursorPos() .....

CPoint pt;
::GetCursorPos(&pt); // Retrieve mouse pos in pt

Sample : Mouse gestures recognition : http://www.codeproject.com/cpp/gestureapp.asp

>>How to detect key stroke

See :
Keyboard messages/accelerators handling in MFC dialog based applications

>>- How to get all opened windows name, position and handle/pointer

You may enumerate windows using EnumWindows API to retrieve handles and then use APIs like GetWindowPos to retrieve postition etc..
Check this : Finding module name from the window handle

>>How to put active windows on top

you may use ::SetWindowPos() with HWND_TOPMOST...
Check : Making a Window "Always On Top"

>>- How to make a screen cap

You may check following artcile with complete src :
Barry's Screen Capture : http://www.codeguru.com/cpp/g-m/gdi/capturingimages/article.php/c3663/

For more sources and example tutorials you may search codeguru / codeproject sites.

Hope this helps

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
jgplatformAuthor Commented:
Is there a C# version of these code?
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
Microsoft Development

From novice to tech pro — start learning today.