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
Ïà¹ØÎĵµ£º
unit unitMain;
interface
uses
Registry, shlobj,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TExtForm = class(TForm)
ledExtension: TLabeledEdit;
ledAssocApp: TLabeledEdit;
GetAssocApp: TButton;
AssocTh ......
http://www.delphibbs.com/delphibbs/dispq.asp?LID=2421470
±¾ÎÄÊÇ¡¶Delphi µÄRTTI»úÖÆÇ³Ì½¡·µÄÐøÆª£¬ÉÏÆªµØÖ·ÔÚ£º
http://www.delphibbs.com/delphibbs/dispq.asp?lid=2420610
±¾ÎÄÉÏÆª»ù±¾ÉÏÊÇ
RTTI ÈëÃŽéÉÜ£¬ÐøÆª½éÉÜÁËËùÓÐ TypInfo.pas Öеĺ¯Êý£¬¸½¼ÓÁË Classes.pas¡¢Graphics.pas¡¢Controls.pas
ÖÐµÄ ......
Delphi×Ö·û´®¡¢PCharÓë×Ö·ûÊý×éÖ®¼äµÄת»»
ÉèÓÐÒÔÏÂÈý¸ö±äÁ¿£º
var
s:string;
p:pchar;
a:array[1..20] of char;
ÄÇôÈýÕßÖ®¼äµÄת»»ÈçÏ£º
1¡¢×Ö·û´®µ½PChar
p:=PChar(s);
2¡¢PCharµ½×Ö·û´®
s:=p;
3¡¢PCharµ½×Ö·ûÊý×é
StrCopy(@a,p);
4¡¢×Ö·ûÊý×éµ ......
delphiÖÐapplication.processmessagesµÄ×÷ÓÃ
procedure TForm1.Button2Click(Sender: TObject);
var
I, J, X, Y: Word;
begin
I := 0;
J := 0;
while I < 64000 do
begin
Randomize;
& ......
Ò»¡¢¸ÅÊö¼°Ê¾Àý´úÂë
DelphiÖаüÀ¨Ðí¶àÒѾ·â×°ºÃµÄÀ༰¿Ø¼þ£¬ÆäÖеķǿÉÊÓ»¯¿Ø¼þ¿âÒÔ¹¦ÄÜ·½Ê½»®·Ö¿É´¦ÀíÖî¶àÓ¦ÓÃÐèÇó¡£ÈôʹÓÃC£«£«ÊµÏÖϵͳʱ¶ÔijЩ¹¦Äܼòµ¥µ÷ÓÃdelphiÖÐÏֳɵĿâʱ¼´¿É¡£Òò´Ë½«delphiÖеĿâÒÔDLLÐÎʽ·â×°ºÃÖ®ºóÈçºÎ½«·½·¨µ¼³ö¿É¹©C£«£«µ÷ÓÃÊDZ¾ÎļǼµÄÖØµã¡£C£«£«µ÷Óõķ½Ê½ÓжàÖÖ£¬ÔÚÕâÀïÖ»ÌÖÂÛÒ»ÖÖ¾² ......