UTILISATIONS D'API

cs_DEL Messages postés 15 Date d'inscription dimanche 8 avril 2001 Statut Membre Dernière intervention 26 juin 2005 - 26 janv. 2002 à 10:16
mmuller57 Messages postés 174 Date d'inscription mardi 10 avril 2001 Statut Membre Dernière intervention 30 juillet 2003 - 26 janv. 2002 à 20:24
comment utiliser les api findwindow, findwindowex et sendmessage en C ?

merci d'avance =)

++DEL

3 réponses

mmuller57 Messages postés 174 Date d'inscription mardi 10 avril 2001 Statut Membre Dernière intervention 30 juillet 2003 1
26 janv. 2002 à 11:52
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
);

The FindWindowEx function retrieves the handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the given child window.

HWND FindWindowEx(

HWND hwndParent, // handle to parent window
HWND hwndChildAfter, // handle to a child window
LPCTSTR lpszClass, // pointer to class name
LPCTSTR lpszWindow // pointer to window name
);

The SendMessage function sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message. The PostMessage function, in contrast, posts a message to a thread’s message queue and returns immediately.

LRESULT SendMessage(

HWND hWnd, // handle of destination window
UINT Msg, // message to send
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
0
cs_DEL Messages postés 15 Date d'inscription dimanche 8 avril 2001 Statut Membre Dernière intervention 26 juin 2005
26 janv. 2002 à 13:35
eh bien merci mais j'a v deja trouvé tout seul en bidouillant. il suffit d'inclure <windows.h> et ensuite c bon on peut utiliser les fonctions
0
mmuller57 Messages postés 174 Date d'inscription mardi 10 avril 2001 Statut Membre Dernière intervention 30 juillet 2003 1
26 janv. 2002 à 20:24
Ben c'est un peu normal puisqu'elle sont dans windows.h !
0
Rejoignez-nous