Developing special screen display effects with BCB

Source: Internet
Author: User

In the past, programmers in the DOS platform to develop the application software, will use the open features of DOS, through the interrupt to write some special display effects, to give their own programs to add some interesting features. However, with the gradual use of Windows-oriented programming and visualization of the fourth generation of development tools, people are increasingly constrained by the unified programming style of Windows, and it becomes more and more difficult to use the original method to implement some special display effects because of the interruption of Windows Direct management.

So how does a programmer in Windows age realize the special effects of a window? In fact, because the entire windows is a graphical display system, for the system, the user program of each interface, window is a system of a canvas. Programmers can use this feature to realize the special effects of Windows.

Recently, I use C + + Builder 5.0 Enterprise successfully implemented the function, now introduced as follows:

1, in BCB to establish a project file PROJECT1.DPR, add the following controls in Form1:

控件名称           属性         值
   TForm             Color       clBTnText
   TMainMenu           Name        MainMneu1
   TImage             Name         Image1
                  Align       alClient
                  AutoSize       True
  同时在 MainMenu1控件中增加一个菜单项,其属性为:
   Name             Caption
   Items1           图像从中间往左右分出
   Items2           图像从左右往中间合进
   Items3           图像从中间往上下分出
   Items4           图像从上下往中间合进
   Items5           图像从左移入
   Items6           图像从右移入
   Items7           图像从上移入
   Items8           图像从下移入
   Items9           图像从左刷屏显示
   Items10          图像从右刷屏显示
   Items11          图像从上刷屏显示
   Items12          图像从下刷屏显示
   Items13          图像从上往下流水
   Items14          图像从下往上流水
   Items15          图像圆形展出
   Items16          图像左右错移
   Items17          图像上下错移

Also add the following variables to private in Unit.cpp:

private:
   BITMAP bm;
   Graphics::TBitmap *Bitmap1;
   int i,j;
   int WideHalf;
   TRect Dest1,Source1,Dest2,Source2;
   int HeightHalf;
   HRGN MyRgn;

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.