Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Nov : BM_CLICK Message with Hidden Button (Peter Below)

www.cryer.info
Managed Newsgroup Archive

BM_CLICK Message with Hidden Button (Peter Below)

Subject:BM_CLICK Message with Hidden Button (Peter Below)
Posted by:"Jack MacRank" (ja..@macrank.com)
Date:Thu, 2 Nov 2006 04:14:30

Hello,

I have the following project where I need to simulate button clicks on
and pasting of text to an external application using my Delphi created
application.  With the great Peter Below + Google Groups I have this code:

SendMessage(hEnterKey, BM_CLICK, 0, 0);

SendMessage(hTextBox, WM_SETTEXT, 0, Integer(PChar('Test')));

SendMessage(hOK, BM_CLICK, 0, 0);

SendMessage(hCancel, BM_CLICK, 0, 0);

The code works great...except when the application is either minimized
or hidden behind another window.  When that happens my application just
exits out of the method.

When a window(control) is hidden, is the handle not available?  Is there
another way I can still do what I need to do while the application is
minimized?  Maybe a "detect hidden windows" flag or something?

Thanks for your help in advance!

Replies:

www.cryer.info
Managed Newsgroup Archive