Gestion touche RETURN dev-c++ avec dialogBox Windows

Résolu
cs_yves_r Messages postés 21 Date d'inscription mercredi 27 octobre 2004 Statut Membre Dernière intervention 27 avril 2005 - 26 nov. 2004 à 10:54
cs_yves_r Messages postés 21 Date d'inscription mercredi 27 octobre 2004 Statut Membre Dernière intervention 27 avril 2005 - 26 nov. 2004 à 12:21
Bonjour,

J'essaie de gérer la touche RETURN dans un prog en Dev-C++ Windows.

J'ai un WinMain ordinaire:
--------------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
{
return DialogBox( hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, proc_win);
}
------------------------------------------------------------------

Dans la Callback proc, j'ai intégré dans mon switch le cas WM_KEYDOWN:
------------------------------------------------------------------
.....
case WM_KEYDOWN :
{
if (wParam == VK_RETURN)
MessageBox(hwnd, "Enter RETURN", "Warning", MB_OK);

}
break;
.....
-------------------------------------------------------------------
Mais impossible d'attraper l'évènement touche RETURN.

Quelqu'un a-t-il une idée ?

Merci. :)

Yves R

2 réponses

BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
26 nov. 2004 à 11:07
HOOK DE ENTER SUR DIALOGBOX (WIN32)
http://www.cppfrance.com/code.aspx?id=11007

ciao...
BruNews, MVP VC++
3
cs_yves_r Messages postés 21 Date d'inscription mercredi 27 octobre 2004 Statut Membre Dernière intervention 27 avril 2005
26 nov. 2004 à 12:21
Un Grand merci, ça marche super bien.

:big) Yves R
0
Rejoignez-nous