Delphi 实现程序 动态 类名
1、首先将delphi中Controls单元提取
2、修改Controls单元中如下部分:
procedure TWinControl.CreateParams(var Params: TCreateParams);
begin
FillChar(Params, SizeOf(Params), 0);
with Params do
begin
Caption := FText;
Style := WS_CHILD or WS_CLIPSIBLINGS;
AddBiDiModeExStyle(ExStyle);
if csAcceptsControls in ControlStyle then
begin
Style := Style or WS_CLIPCHILDREN;
ExStyle := ExStyle or WS_EX_CONTROLPARENT;
end;
if not (csDesigning in ComponentState) and not Enabled then
Style := Style or WS_DISABLED;
if FTabStop then Style := Style or WS_TABSTOP;
X := FLeft;
Y := FTop;
Width := FWidth;
Height := FHeight;
if Parent <> nil then
WndParent := Parent.GetHandle else
WndParent := FParentWindow;
WindowClass.style := CS_VREDRAW + CS_HREDRAW + CS_DBLCLKS;
WindowClass.lpfnWndProc := @DefWindowProc;
WindowClass.hCursor := LoadCursor(0, IDC_ARROW);
WindowClass.hbrBackground := 0;
WindowClass.hInstance := HInstance;
//////////////////
StrPCopy(WinClassName, IntToStr(GetTickCount));
//StrPCopy(WinClassName, ClassName);
end;
end;
本文来自Delphi之窗,原文地址:http://www.52delphi.com
相关文档:
1、当然是先要卸载以前安装的Ehlib组件了,在菜单的“Component”的“install Packeges”里,选择ehlib XX,选择“Remove”。
2、接下来在库里加入这个控件的引用路径,先新建一个文件夹,比如“D:\Component\Ehlib”(最好把要安装的控件都拷贝到这个Component目录下),然后把 ......
//**************需要强调的两个快捷键**********************
51.CTRL+SHIFT+U 代码整块左移2个空格位置
52.CTRL+SHIFT+I 代码整块右移2个空格位置
60.Ctrl+Alt+c 注释块
61.Ctrl+Alt+u & ......
方法一:
直接弹出UDL对话框:
use
ADOConed;
EditConnectionString(ADOQuery1);
方法二:
⑴、右键---新建---文本文档,重命名为 connSet.udl 。
⑵、双击打开 connSet.udl 按提示操作配置数据库,选择本地或远程数据库,配置好后退出。
⑶、使用Delphi 控件TADOConnection连接代码:
在Form ......
一、概述及示例代码
Delphi中包括许多已经封装好的类及控件,其中的非可视化控件库以功能方式划分可处理诸多应用需求。若使用C++实现系统时对某些功能简单调用delphi中现成的库时即可。因此将delphi中的库以DLL形式封装好之后如何将方法导出可供C++调用是本文记录的重点。C++调用的方式有多种,在这里只讨论一种静 ......