Paradox Community

Items in pnews.paradox-programming

Date:Wed, 19 Dec 2018 20:42:33 +1100
From:Robert MacMillan <>
This has to be so simple but I cant quite figure out how to do it.

This function generates a Dynamic Array with a Key - which is the 
Windows Window ID and the Value which is the name of the window. How can 
I parse the array for the Window Name and extract the Key Value to pass 
to a Windows API Sendmessage call to the particular window.

Surely there is some way easy way to search the array, short of dealing 
with it item by item, to find a specific Window Name and the 
corresponding Key which is the internal Windows ID. So lets say I want 
to find the window called, in the values, for example "Untitled - 
NotePad" and its associated Windows ID. In my case there will only be 
one window at a time open with the correct value whereas of course could 
be several NotePad windows open at one time.

There is a function called indexOf ( const value AnyType ) LongInt but 
that does not work to locate a value which is the Windows Window 
Destripter - in text - and then return the Key.

I can stick the array in a table and then do a locate but I would really 
like to do the process entirely from the Dynamic Array but cant figure 
out how.



Copyright © 2004