j'ai ceci dans un programme compilé avec Delphi 6:
function MsgWindowProc(Window: HWnd; AMessage, WParam, LParam: longint):
longint; stdcall;
begin
if (AMessage = WM_SYSCHAR) and (WParam = 13) then
begin
WriteData;
result := 0
end
else
result := CallWindowProc(oldeditwndproc, Window, AMessage, WParam,
LParam)
end;
Cette procédure appartient à un contrôle "edit" et elle est censée
réagir à la combinaison Alt + Entrée. Ça fonctionne à merveille sous
Windows 2000 et XP, mais alors Windows 98 SE boude et ne fait rien. J'ai
essayé sur deux ordinateurs différents avec le même résultat.
En bidouillant j'ai constaté que sous 2000/XP, en pressant Alt+Entrée,
AMessage contient les valeurs (décimales) 260, 261 et 262, l'une après
l'autre, alors que sous 98 SE, j'ai 260 et 261 mais pas 262: donc,
WM_SYSKEYDOWN, WM_SYSKEYUP mais pas WM_SYSCHAR.
Pourtant selon win32.hlp, WM_SYSCHAR existe aussi sous Windows 9x.