Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

DELPHI GetClassName »ñȡָ¶¨´°¿ÚµÄÀàÃû

//ÉùÃ÷:
GetClassName(
hWnd: HWND; {Ö¸¶¨´°¿Ú¾ä±ú}
lpClassName: PChar; {»º³åÇø}
nMaxCount: Integer {»º³åÇø´óС}
): Integer; {·µ»ØÀàÃû´óС; ʧ°Ü·µ»Ø 0}
//²âÊÔ1: н¨Ò»¸ö¹¤³Ì, Ö÷´°¿ÚµÄÀàÃûĬÈÏÊÇ TForm1, ÓóÌÐò»ñȡһÏ¿´¿´
var
ps: array[0..254] of Char;
begin
GetClassName(Handle, ps, 255);
ShowMessage(ps); {TForm1}
end;
//²âÊÔ2: ¿´¿´ "¼ÆËãÆ÷" ´°¿ÚµÄÀàÃû(ÏÈÆô¶¯¼ÆËãÆ÷)
var
h: HWND;
ps: array[0..254] of Char;
begin
h := FindWindow(nil, '¼ÆËãÆ÷'); {Õâ¾äÊÇ»ñÈ¡¼ÆËãÆ÷´°¿ÚµÄ¾ä±ú}
GetClassName(h, ps, 255);
ShowMessage(ps); {SciCalc}
end;
//²âÊÔ3: ¿´¿´¼Çʱ¾´°¿ÚµÄÀàÃû(ÏÈÖØÐÂÆô¶¯¼Çʱ¾):
var
h: HWND;
ps: array[0..254] of Char;
begin
h := FindWindow(nil, 'ÎÞ±êÌâ - ¼Çʱ¾'); {Õâ¾äÊÇ»ñÈ¡¼Çʱ¾´°¿ÚµÄ¾ä±ú}
GetClassName(h, ps, 255);
ShowMessage(ps); {Notepad}
end;


Ïà¹ØÎĵµ£º

Delphi µÄ Dll º¯ÊýµÄ µ÷ÓÃ


Ò»¡¢Dll½¨Á¢
£¨Ò»£©DLLÏîÄ¿µÄ½¨Á¢
library mydll;
 
uses
base in 'base.pas';
 
exports
Triple name 'Tr';
 
{$R *.res}
 
begin
end.
 
£¨¶þ£©º¯Êýµ¥Ôª
unit base;
 
interface
 
uses windows;
 
function Triple(N:integer):integer;stdcall;
  ......

delphi±àÂë¹æ·¶Îĵµ

delphi±àÂë¹æ·¶Îĵµ
Ŀ¼
1¡¢Ç°ÑÔ 3
2¡¢Ô´³ÌÐòÊéд¹æ·¶ 3
2.1ͨÓÃÔ´´úÂë¸ñʽ¹æ·¶ 3
2.1.1Ëõ½ø 3
2.1.2±ß¾à 3
2.1.3 Begin…EndÓï¾ä 3
2.1.4×¢ÊÍ 4
2.2 OBJECT PASCALÓï¾ä¸ñʽÊéд¹æ·¶ÓëÓ÷¨ 4
2.2.1À¨ºÅ 4
2.2.2±£Áô×ֺ͹ؼü×Ö 4
2.2.3¹ý³ÌºÍº¯Êý 5
2.2.4±äÁ¿ 5
2.2.5ÀàÐÍ 6
2.2.6Óï¾ä 6
2.2.7½á¹¹» ......

delphi ×Ô¶¨ÒåÎļþ

±¾ÎÄ×ªÔØ:http://rabbitfox.blog.sohu.com/29948084.html
             http://delphi.about.com/od/fileio/a/fileof_delphi.htm
Ê×ÏÈÏò×÷Õß±íʾ¸Ðл£¡
¡¶ÀûÓÃDelphiµÄ“File Of
Type”´´½¨²¢¹ÜÀíÊôÓÚÄã×Ô¼ºµÄ“Êý¾Ý¿â”¡·
Ô­×÷Õߣ ......

delphiʵÏÖµ÷ÓÃdllÖеĴ°Ìå ´úÂë

н¨Ò»¸ödLL¹¤³Ì,н¨Ò»¸ö´°Ìå Fr_bb80 ,ÎÒÃÇÏÈÔÚËüµÄµ¥ÔªÀï¼ÓÈëÏÂÃæÒ»¸öº¯Êý:
function Report(Title:Pchar):Boolean  ;stdcall;
begin
   if Fr_bb80=nil then
   begin
         Fr_bb80:=TFr_bb80.Create(application);
   &nb ......

DELPHIÓÃFindWindow¡¢FindWindowEx ²éÕÒ´°¿Ú

FindWindow(
lpClassName, {´°¿ÚµÄÀàÃû}
lpWindowName: PChar {´°¿ÚµÄ±êÌâ}
): HWND; {·µ»Ø´°¿ÚµÄ¾ä±ú; ʧ°Ü·µ»Ø 0}
//FindWindowEx ±È FindWindow ¶à³öÁ½¸ö¾ä±ú²ÎÊý:
FindWindowEx(
Parent: HWND; {Òª²éÕÒ×Ó´°¿ÚµÄ¸¸´°¿Ú¾ä±ú}
Child: HWND; {×Ó´°¿Ú¾ä±ú}
ClassName: PChar ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ