Writing Windows Win32 application

Posted on 2007-07-19
Last Modified: 2013-12-03
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

Question by:jgplatform
    LVL 22

    Accepted Solution

    >>- 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 :

    >>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 :

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

    Hope this helps

    Author Comment

    Is there a C# version of these code?

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    bigDiff challenge 17 60
    centeredAverage challenge 8 92
    disable Win7 network security 2 47
    Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
    This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
    This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now