[Deplhi 4] Comment recuperer le Handle d'une application ?

Comment recuperer le Handle d'une application ? [Deplhi 4] - Programmation

Marsh Posté le 02-04-2002 à 00:47:09    

Salut :)
Ma question est simple :)
Comment recuperer le Handle d'une application à partir du nom ???
:)
Mc d'avance.

Reply

Marsh Posté le 02-04-2002 à 00:47:09   

Reply

Marsh Posté le 02-04-2002 à 00:58:13    

FindWindow + F1
 

Citation :

The FindWindow function retrieves the handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows.  
 
HWND FindWindow(
 
    LPCTSTR lpClassName, // pointer to class name
    LPCTSTR lpWindowName  // pointer to window name
   );  
 
 
Parameters
 
lpClassName
 
Points to a null-terminated string that specifies the class name or is an atom that identifies the class-name string. If this parameter is an atom, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpClassName; the high-order word must be zero.  
 
lpWindowName
 
Points to a null-terminated string that specifies the window name (the window's title). If this parameter is NULL, all window names match.  
 
 
 
Return Values
 
If the function succeeds, the return value is the handle to the window that has the specified class name and window name.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.  
 
See Also
 
EnumWindows, FindWindowEx, GetClassName, GlobalAddAtom


---------------
www.alliancefrancophone.org ... Home is where the heart is
Reply

Marsh Posté le 02-04-2002 à 04:18:07    

JWhy a écrit a écrit :

FindWindow + F1
 

Citation :


HWND FindWindow(
 
    LPCTSTR lpClassName, // pointer to class name
    LPCTSTR lpWindowName  // pointer to window name
   );

 




 
Je peux avoir un exemple ? svp

Reply

Marsh Posté le 02-04-2002 à 15:32:10    

:bounce:

Reply

Marsh Posté le 02-04-2002 à 15:38:58    

:sarcastic:

Code :
  1. - - -
  2. var
  3.   hHandle : HWND;
  4. begin
  5.   hHandle := FindWindow(nil, 'Untitled - Notepad');
  6. end;
  7. - - -

 

[jfdsdjhfuetppo]--Message édité par JWhy--[/jfdsdjhfuetppo]


---------------
www.alliancefrancophone.org ... Home is where the heart is
Reply

Marsh Posté le 02-04-2002 à 15:44:51    

Mc BCP :)
ma enfin pouvoir etre tranquille au nivo du handle
car jutiliser un otre logiciel FreeWare pour les lire, et je l'ecriver dans une entrer text pour que le soft l'utilise.
 
Maintenant, ca va etre AUTO :)
 
Dit, tu peux regarde mon autre poste :) stp

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed