Quick display of irregular forms in C++builder

Source: Internet
Author: User
Tags save file

Application of irregular forms increases the appeal of software

The traditional Windows application software interface gives the feeling is always the same square form, look at a long time will inevitably some boring, always want to see some different general software interface. Today, a considerable number of commercial software in the provision of excellent and powerful features, while the software interface is doing more and more beautiful, such as "Super Jie Ba 2000" In the interface Plug-ins, the use of the people must be full of their gorgeous appearance. As a programming enthusiast, if the software you write has a similar interface, it may attract more eye gaze. So, let's start making our own beautiful interface right now.

Technical Insider

To add an application of irregular forms to your own program, you first need to familiarize yourself with the use of several Windows API functions, which are: oval (or round) area create function CreateEllipticRgn, polygon area create function CreatePolygonRgn, The rectangular area creates function createrectrgn, rectangular regions with rounded corners, and creates functions createroundrectrgn. You can use these functions to create different types of form regions, or you can use Windows API function Combinergn to combine several simple areas into a complex area.

The next step is to display the created area on the screen, as well as using Windows API functions, this time using the SetWindowRgn function.

WINDOWS API functions are defined in the Borland C + + Builder header file, and these API functions are used in an application as if they were common library functions in C + +.

Preparatory work

To prepare a background picture for your program, the recommended method is to use the Magnetic lasso tool to select the image profile you want--copy--new file (background with white)--paste--Save file (PSD file) Use ACDSee and so on to see the picture software to convert the saved PSD file to BMP file Face.bmp standby. The following figure:

Referencing pictures in programs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.