Hi, I am trying to get text from a textbox. THis is my code. I dont know how to write the stringBuffer part.
proc getControlText*(chHwnd : HWND) : string =
var bufferSize : int32
bufferSize = SendMessage(chHwnd, WM_GETTEXTLENGTH, 0, 0)
var strBuffer : # What to write here ?
echo SendMessage(chHwnd,WM_GETTEXT, cast[WPARAM](bufferSize), cast[LPARAM]( strBuffer) )
result = strBuffer
Please help me. Thanks in advance.I found a solution last night and i added a reply to this thread but i dont know, it is not here for unknown reason. I think a network problem. By the way, i tried a lot of possibilities and when tried with LPWSTR, voila ! it worked. This is the solution.
var stringBuffer : LPWSTR = ""
Thats it. Thanks for the replys.