Closing another App...

From: Scott (scott_at_asmr.net)
Date: 10/31/04


Date: 30 Oct 2004 15:24:14 -0700

Hi,

Can anyoner shed any light on why this code returns an error...

procedure CloseApp;
var
  win: HWND;
begin
  win := FindWindow(nil,'windowTitle');
  SendMessage(win, WM_CLOSE, 0, 0);
end;

I keep getting the following error...

[Error] test.dpr(360): Undeclared identifier: 'WM_CLOSE'

I have got this code from 2 places on the net so I don't really
understand why it's giving this error. Can anyone shed any light on
this for me? Thanks in advance.

Regards,
Scott



Relevant Pages