Creating Shaped Windows

This code sample shows how to create shaped windows using the SetWindowRegion and CreatePolygonRgn WinAPI calls.

Screen-shot

The code builds up an array of the Windows POINTAPI type to define the points of the shape (in this case a Christmas Tree), a Windows region is created using the CreatePolygonRgn call and then applied to the main window using the SetWindowRgn call.

Download zipped project file (5k)



Comments

  • Question

    Posted by Legacy on 01/30/2002 12:00am

    Originally posted by: Feldor

    how would you make so when u first start the program it changes shape?

    • question

      Posted by raviraj on 04/27/2004 09:53am

      how to create a form dyanamically

      Reply
    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As a development and deployment platform, RHEL offers an efficient, scalable, and robust operating environment with certified security and flexible deployment options in physical and virtualized environments. To assess and quantify the business benefits of RHEL, IDC recently conducted in-depth interviews with IT staff members of 21 companies using RHEL servers. The organizations represent a broad range of industries and have an average of 22,700 employees. RHEL servers accounted for 23% of the servers …

  • Savvy enterprises are discovering that the cloud holds the power to transform IT processes and support business objectives. IT departments can use the cloud to redefine the continuum of development and operations—a process that is becoming known as DevOps. Download the Executive Brief DevOps: Why IT Operations Managers Should Care About the Cloud—prepared by Frost & Sullivan and sponsored by IBM—to learn how IBM SmartCloud Application services provide a robust platform that streamlines …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds