Application和Screen这两个对象是何时创建的

zwjchina 2003-06-04 05:08:50
如题
...全文
133 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
PhilexPei 2003-06-05
  • 打赏
  • 举报
回复
大哥们
直接说先Screen后application不就得了
算法收藏了
PhilexPei 2003-06-05
  • 打赏
  • 举报
回复
占地盘啊,接分
cscer 2003-06-05
  • 打赏
  • 举报
回复
接分喽~
l_xiaofeng 2003-06-05
  • 打赏
  • 举报
回复
接分先,再说!
zhksoft 2003-06-05
  • 打赏
  • 举报
回复
这么简单的问题,问出来就这么高深了???????????
还是想着接接分吧!
接分不能白接,给你几个delphi新闻组吧!!!
新闻组


borland.public.delphi.activex.controls.using
borland.public.delphi.activex.controls.writing
borland.public.delphi.database.desktop
borland.public.delphi.database.multi-tier
borland.public.delphi.database.sqlservers
borland.public.delphi.graphics
borland.public.delphi.ide
borland.public.delphi.internet
borland.public.delphi.jobs
borland.public.delphi.non-technical
borland.public.delphi.objectpascal
borland.public.delphi.oleautomation
borland.public.delphi.opentoolsapi
borland.public.delphi.reporting-charting
borland.public.delphi.thirdparty-tools
borland.public.delphi.vcl.components.using
borland.public.delphi.vcl.components.writing
borland.public.delphi.winapi
alt.comp.lang.borland-delphi
comp.lang.pascal.delphi.components.misc
comp.lang.pascal.delphi.components.usage  
comp.lang.pascal.delphi.components.writing
comp.lang.pascal.delphi.databases
comp.lang.pascal.delphi.misc

walterwl 2003-06-05
  • 打赏
  • 举报
回复
先接分,
楼主的Alpha混合算法干什么用的?
flyingkiller 2003-06-05
  • 打赏
  • 举报
回复
initialization
代码段中调用 InitControls;
建立了
Application和Screen对象。
zwjchina 2003-06-05
  • 打赏
  • 举报
回复
这下是问题大了,我不敢结呀,这是在技术区!
算了,贴一段Alpha混合算法:
procedure AlphaBlend(DestBitmap, SourceBitmap: TBitmap;
ARect: TRect; BlendScale: Byte);
var
Source, Dest: ^Cardinal;
x, y: Integer;
C, CBRB, CBG: Cardinal;
TmpRect, MidRect: TRect;
StoreP: TPoint;
begin
if (DestBitmap = nil) or (SourceBitmap = nil) then exit;

with TmpRect, DestBitmap do
begin
TopLeft := Point(0, 0);
Bottom := Height;
Right := Width;
end;
if not InterSectRect(TmpRect, TmpRect, ARect) then exit;

StoreP := TmpRect.TopLeft;
OffsetRect(TmpRect, -TmpRect.Left, -TmpRect.Top);

with MidRect, SourceBitmap do
begin
TopLeft := Point(0, 0);
Bottom := Height;
Right := Width;
end;
if not InterSectRect(TmpRect, TmpRect, MidRect) then exit;

if DestBitmap.PixelFormat <> pf32bit then
DestBitmap.PixelFormat := pf32bit;

if SourceBitmap.PixelFormat <> pf32bit then
SourceBitmap.PixelFormat := pf32bit;

{$WARNINGS OFF}
with TmpRect do
case BlendScale of
255:
for y := Top To Bottom - 1 do
begin
Source := SourceBitmap.ScanLine[y];
Dest := DestBitmap.ScanLine[y + StoreP.y];
Move(Source^, Dest^, (Right - Left) * SizeOf(Cardinal));
end;
0:;
else
for y := Top to Bottom - 1 do
begin
Source := SourceBitmap.ScanLine[y];
Dest := DestBitmap.ScanLine[y + StoreP.Y];

Inc(Dest, StoreP.X);
for x := Left to Right do
begin
if Source^ <> Dest^ then
begin
CBRB := (Dest^ and $00FF00FF) * (255 - BlendScale);
CBG := (Dest^ and $0000FF00) * (255 - BlendScale);
C := ((Source^ and $00FF00FF) * BlendScale + CBRB) and $FF00FF00 +
((Source^ and $00FF00) * BlendScale + CBG) and $00FF0000;
Dest^ := C shr 8;
end;
Inc(Source);
Inc(Dest);
end;
end;
end;
{$WARNINGS ON}
end;
cow8063 2003-06-04
  • 打赏
  • 举报
回复
找到了,给我们说说看呀,让我们长长见识
lion_lh 2003-06-04
  • 打赏
  • 举报
回复
接分
CloneCenter 2003-06-04
  • 打赏
  • 举报
回复
看看先,接分后!
firetoucher 2003-06-04
  • 打赏
  • 举报
回复
qwertyasd 2003-06-04
  • 打赏
  • 举报
回复
只有接分的份了!
patchclass 2003-06-04
  • 打赏
  • 举报
回复
太简单了,就太难了,我那里知道CREATE什么时候调用
linzhisong 2003-06-04
  • 打赏
  • 举报
回复
晕,都看不懂!
zwjchina 2003-06-04
  • 打赏
  • 举报
回复
哦!
在Controls单元的初始部分,以下是代码!

procedure InitControls;
var
UserHandle: HMODULE;
begin
WindowAtomString := Format('Delphi%.8X',[GetCurrentProcessID]);
WindowAtom := GlobalAddAtom(PChar(WindowAtomString));
ControlAtomString := Format('ControlOfs%.8X%.8X', [HInstance, GetCurrentThreadID]);
ControlAtom := GlobalAddAtom(PChar(ControlAtomString));
RM_GetObjectInstance := RegisterWindowMessage(PChar(ControlAtomString));
CanvasList := TThreadList.Create;
InitIMM32;
Mouse := TMouse.Create;
Screen := TScreen.Create(nil);
Application := TApplication.Create(nil);
Application.ShowHint := True;
RegisterIntegerConsts(TypeInfo(TCursor), IdentToCursor, CursorToIdent);
UserHandle := GetModuleHandle('USER32');
if UserHandle <> 0 then
@AnimateWindowProc := GetProcAddress(UserHandle, 'AnimateWindow');
end;

{ TCustomListControl }

procedure TCustomListControl.MoveSelection(
Destination: TCustomListControl);
begin
CopySelection(Destination);
DeleteSelected;
end;

initialization
NewStyleControls := Lo(GetVersion) >= 4;
InitControls;
StartClassGroup(TControl);
ActivateClassGroup(TControl);
GroupDescendentsWith(TCustomImageList, TControl);
GroupDescendentsWith(TContainedAction, TControl);
GroupDescendentsWith(TCustomActionList, TControl);

finalization
FreeAndNil(DockSiteList);
DoneControls;

end.
wangwei_egw 2003-06-04
  • 打赏
  • 举报
回复
高深
imageonline 2003-06-04
  • 打赏
  • 举报
回复
贴答案
zwjchina 2003-06-04
  • 打赏
  • 举报
回复
本来以为很难找,没想到我这么快找到了!哈哈!那就换个题目吧!
问题时我暂时没什么问题

5,392

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧