По моему замыслу окно должно раскрываться на весь экран по альт+ентер, оно раскрывается, но обратно схлопывается при повторном нажатии альт+ентер неправильно.
uses Windows, Messages;
var C: TWndClass; H: hWnd; A: THandle; M: TMsg;
const acc: array [0 .. 2] of word = (fVirtKey or fAlt, vk_Return, 1);
function WP(H: hWnd; M: uInt; W: wParam; L: lParam): longint; stdcall; begin Result := 0; case M of wm_Command: begin case LoWord(W) of 1: begin if IsZoomed(H) then begin ShowWindow(H, sw_Restore); SetWindowLong(H, gwl_Style, ws_OverlappedWindow or ws_Visible); вот в этом месте!!! end else begin SetWindowLong(H, gwl_Style, integer(ws_PopUp or ws_Visible)); ShowWindow(H, sw_ShowMaximized); end; end; end; end; wm_Destroy: begin PostQuitMessage(0); Exit; end; end; Result := DefWindowProc(H, M, W, L); end;