I am calling a SendMessage from SilkTest, and a custom function in our app returns a string to lParam in the SendMessage call. The custom function is filling the lParam buffer with a TCHAR. Here is a sample of the actual function.
The function returns the strings length, but the lParam, which should contain some string, is always empty. Does anyone know if the TCHAR type would be the issue. I thought it was internally mapped to a WCHAR or CHAR.
We did look at Spy++, and it was showing correct data.
Here's some more info. We created a simple test app that has a textfield, containing the text we want to read, and also a field that prints out what the app receives for the SendMessage. The app contains a custom message for getting the text of the field, and is essentially the same thing as when WM_GETTEXT is used.
Here is the SilkTest code used in the test.
// ** BEGIN
const WM_CUSTOM_GETTEXT = WM_USER + 100
I would probably try to get a vbscript SendMessage call to work with your user-defined message to make sure that all the message map stuff is done correctly in your app (since user defined messages don't have all the 'freebies' you get with windows messages.
If the vbscript call does work and the silktest doesn't... then at least you have an emergency 'cut-bait point' where you can call the vbscript from silktest and get your data if you never find the working silktest syntax.