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

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • CentreCorp is a fully integrated and diversified property management and real estate service company, specializing in the "shopping center" segment, and is one of the premier retail service providers in North America. Company executives travel a great deal, carrying a number of traveling laptops with critical current business data, and no easy way to back up to the network outside the office. Read this case study to learn how CentreCorp implemented a suite of business continuity services that included …

Most Popular Programming Stories

More for Developers

RSS Feeds