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

Thanks
Roy
jgplatformAsked:
Who is Participating?
 
mahesh1402Connect With a Mentor Commented:
>>- How to detect mouse position

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

e.g.
     
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
http://www.codeproject.com/dialog/pretransdialog01.asp

>>- 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
http://www.codeproject.com/cpp/ModuleNameFromWindwHandle.asp

>>How to put active windows on top

you may use ::SetWindowPos() with HWND_TOPMOST...
Check : Making a Window "Always On Top"
http://www.codeguru.com/cpp/w-d/dislog/article.php/c1857/

>>- 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
-MAHESH
0
 
jgplatformAuthor Commented:
Excellent!
Is there a C# version of these code?
0
All Courses

From novice to tech pro — start learning today.