Re: SendMessage( HWnd, WM_CLOSE, 0, 0); does not work
- From: Don <don81846<NODAMSPAM>@earthlink.net>
- Date: Sun, 07 Oct 2007 16:07:54 -0700
On Tue, 02 Oct 2007 05:10:31 -0700, Sonnich Jensen
<sonnich.jensen@xxxxxxxxxxxxxxxxx> wrote:
hi all
the following piece of code does not work. I get a "negative" ding on
the wm_close line... any ideas anyone?
procedure TForm1.Button2Click(Sender: TObject);
var
HWnd: thandle;
begin
HWnd := FindWindow('IEFrame', nil);
while HWnd <> 0 do
begin
SendMessage( HWnd, WM_CLOSE, 0, 0);
HWnd := FindWindow('IEFrame', nil);
end;
end;
Try using PostMessage instead of SendMessage. It works for me.
Don
.
- References:
- SendMessage( HWnd, WM_CLOSE, 0, 0); does not work
- From: Sonnich Jensen
- SendMessage( HWnd, WM_CLOSE, 0, 0); does not work
- Prev by Date: Re: What's wrong ?
- Next by Date: cheap runescape gold on www.cheap-runescape-gold.com
- Previous by thread: Re: SendMessage( HWnd, WM_CLOSE, 0, 0); does not work
- Next by thread: RegSvr Registration
- Index(es):