B
bence.k
Hello all!
I'm writing because I'm having some problems with the SetWindowText api
(Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA"
(ByVal hwnd As Long, ByVal lpString As String) As Long)
I know the handle, and have the string what i want to see in the title.
Here is the code part:
c = SetWindowText(hwnd, "string")
c should be a double which is not null, it is ok because c returns a
good value every time
but after that
the window's caption should be "string", but it's became empty, not
"string".
i tried another way too. It is the SendMessage function.
we have the handle and the string again, and there is the code:
c = SendMessage(hwnd, 12, vbNull, "string")
c returns 1 so it should be ok
but the caption's text not ok again. it not empty but contains only one
character a Chr(8). if i replace the "string" with a vbNullString then
the caption text is empty again.
How can i set the right text in the caption?
Thanks,
Bence (iecs)
I'm writing because I'm having some problems with the SetWindowText api
(Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA"
(ByVal hwnd As Long, ByVal lpString As String) As Long)
I know the handle, and have the string what i want to see in the title.
Here is the code part:
c = SetWindowText(hwnd, "string")
c should be a double which is not null, it is ok because c returns a
good value every time
but after that
the window's caption should be "string", but it's became empty, not
"string".
i tried another way too. It is the SendMessage function.
we have the handle and the string again, and there is the code:
c = SendMessage(hwnd, 12, vbNull, "string")
c returns 1 so it should be ok
but the caption's text not ok again. it not empty but contains only one
character a Chr(8). if i replace the "string" with a vbNullString then
the caption text is empty again.
How can i set the right text in the caption?
Thanks,
Bence (iecs)