标签:
// 新视窗类
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 ); // 创建一个内切于特定矩形的椭圆区域SetWindowRgn(Main, rg1, true); // 用SetWindowRgn实现程序窗体变形
标签:
原文地址:http://www.cnblogs.com/mengfanrong/p/5184965.html