zoukankan      html  css  js  c++  java
  • 椭圆形的窗体

    //  新视窗类

    with wc do begin

        style := CS_VREDRAW or CS_HREDRAW;
        lpfnWndProc := @GdiProc1;
        cbClsExtra := 0;
        cbWndExtra := 0;
        hCursor := LoadCursor(0, IDC_ARROW);//  ;
        hbrBackground := GetSysColorBrush( windows.COLOR_INFOBK );//HBRUSH(GetStockObject(windows.GRAY_BRUSH));
        hInstance := HInstance;
        lpszMenuName := nil;
        lpszClassName := szAppName;
        //hIcon := ficon1;
        end;
    windows.RegisterClass(wc);


    //  建窗体
    Main := CreateWindowExA(WS_EX_OVERLAPPEDWINDOW, szAppName, szAppName, WS_VISIBLE or WS_SYSMENU  or WS_SizeBox or WS_GROUP,
                            Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT), 800, 600, HWND_DESKTOP, 0, 0, nil);

    //  获取窗口尺寸

    GetWindowRect(Main, re1);

    main_DC := GetWindowDC(Main);

    rg1 := CreateEllipticRgnIndirect( re1 );                                                 // 创建一个内切于特定矩形的椭圆区域
    FillRect(main_DC, re1, 15 + 5 );
    Rectangle(main_DC, re1.Left, re1.Top, re1.Right, re1.Bottom);

    SetWindowRgn(Main, rg1, true);                                                          // 用SetWindowRgn实现程序窗体变形


    注:所有源程序下载,请訪问下载频道-我的资源。


  • 相关阅读:
    装饰器
    函数对象与闭包
    名称空间与作用域
    函数的参数
    函数的基本使用
    ${}与#{}的区别
    thymeleaf之日期格式化
    template might not exist or might not be accessible by any of the configured Template Resolvers
    springboot使用@Scheduled之cron表达式详解
    自定义springboot项目启动图案
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/5184965.html
Copyright © 2011-2022 走看看