相关疑难解决方法(0)

CreateWnd和CreateWindowHandle有什么区别?

Delphi组件有CreateWndCreateWindowHandle(DestroyWndDestroyWindowHandle).它们都打算被后代覆盖,对吧?除了底层的VCL实现之外,不打算调用它?

它们之间有什么区别; 什么时候应该被覆盖?

delphi components

23
推荐指数
1
解决办法
4823
查看次数

控件'xxx'没有父窗口

我正在尝试在Delphi中编写一个dll库,该函数创建一个TFrame后代的实例并返回它.但是当我在一个应用程序中导入这个函数时,每次调用它时我都会得到一个例外,例如"'xxx'控件没有父窗口".我不是百分百肯定,但是当访问任何GUI控件时,该类的构造函数中出现异常.

你能告诉我这种行为的原因是什么吗?我应该只使用TForm后代还是有更好的解决方案?

谢谢!

delphi dll tframe

10
推荐指数
1
解决办法
1万
查看次数

如何在创建中设置TCustomControl的父级

When we create a component as a custom control and the control is dropped on a panel the control always appears on the form rather than the containing control. How do you set the parent of the custom control in Create so that when the button is dropped on panel the buttons parent is the panel?

TGlassButton = class(TCustomControl)
...
public
    { Public declarations }
    constructor Create(AOwner: TComponent); override;
...

constructor TGlassButton.Create(AOwner: TComponent);
  begin
    inherited;  ???????????
    inherited Create(AOwner); ????????????
    Parent …
Run Code Online (Sandbox Code Playgroud)

delphi

3
推荐指数
1
解决办法
3458
查看次数

标签 统计

delphi ×3

components ×1

dll ×1

tframe ×1