设置CheckListBox的parent为desktop,并修改了params,为什么不回自动显示里面的item了 ( 积分: 15 )

  • 主题发起人 主题发起人 autra
  • 开始时间 开始时间
A

autra

Unregistered / Unconfirmed
GUEST, unregistred user!
TSmCheckList = class(TCheckListBox)
private
{ Private declarations }
protected
procedure CreateParams(var Params: TCreateParams);override ;
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('AsmLib', [TSmCheckList]);
end;

{ TSmCheckLis }

procedure TSmCheckList.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style := Style or WS_BORDER;
ExStyle := EXStyle or WS_EX_TOOLWINDOW or WS_EX_TOPMOST;
WindowClass.Style := CS_SAVEBITS;
WndParent := GetDesktopwindow;
end;
end;
1、使用的时候,不管我怎么设置style ,使
setWidowPos倒是可以显示,只是上面不自动显示items.
2、如何修改那个小框框的大小
 
TSmCheckList = class(TCheckListBox)
private
{ Private declarations }
protected
procedure CreateParams(var Params: TCreateParams);override ;
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('AsmLib', [TSmCheckList]);
end;

{ TSmCheckLis }

procedure TSmCheckList.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style := Style or WS_BORDER;
ExStyle := EXStyle or WS_EX_TOOLWINDOW or WS_EX_TOPMOST;
WindowClass.Style := CS_SAVEBITS;
WndParent := GetDesktopwindow;
end;
end;
1、使用的时候,不管我怎么设置style ,使
setWidowPos倒是可以显示,只是上面不自动显示items.
2、如何修改那个小框框的大小
 
请高手相助阿!!!
 

Similar threads

后退
顶部