Home All Groups Group Topic Archive Search About

interop: FindWindow is to Caption as ?? is to Text

Author
12 Jun 2006 1:27 PM
gabe
The lpWindowName parameter in FindWindow gives me the ability to search for
what would be the caption of a dialog (if these were .Net messageboxes).

How would I get what would be the text of that dialog? (again if these were
..Net messageboxes)
Is it possible (or more possible) if we assume that the lpClassName is #32770?

thanks in advance,
gabe

Author
13 Jun 2006 5:49 AM
Mattias Sjögren
>How would I get what would be the text of that dialog? (again if these were
>.Net messageboxes)

You can use for example FindWindowEx to get the handle to the static
text control, and then SendMessage(WM_GETTEXT) to it to retrieve the
text.


>Is it possible (or more possible) if we assume that the lpClassName is #32770?

Yeah that's the standard mesagebox dialog class.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.