msuryadarma
Programmer
Hi. I'm trying to call API to get the length of a Window's title. Here's the code:
I declared these in the Declare Local External Functions space:
--------------------
Function Long GetDesktopWindow() Library "user32.dll"
Function Long GetWindowTextLength(Long hWnd) Library "user32.dll"
Then in the click event of a cb:
--------------------
Long winhandle //container for desktop window's handle
Long textlen //receives length of text of the desktop window
//getting the desktop window's handle. This function WORKS!
winhandle = GetDesktopWindow()
//Find out how many characters are in the window's text.
textlen = GetWindowTextLength(winhandle)
Now I keep getting errors executing GetWindowTextLength. Any ideas? Thanks a lot.
I declared these in the Declare Local External Functions space:
--------------------
Function Long GetDesktopWindow() Library "user32.dll"
Function Long GetWindowTextLength(Long hWnd) Library "user32.dll"
Then in the click event of a cb:
--------------------
Long winhandle //container for desktop window's handle
Long textlen //receives length of text of the desktop window
//getting the desktop window's handle. This function WORKS!
winhandle = GetDesktopWindow()
//Find out how many characters are in the window's text.
textlen = GetWindowTextLength(winhandle)
Now I keep getting errors executing GetWindowTextLength. Any ideas? Thanks a lot.