Re: WM_SETTEXT sets garbage characters
- From: "Jim Mack" <jmack@xxxxxxxxxxxxxxx>
- Date: Wed, 10 May 2006 17:41:45 -0400
WB wrote:
Additional info:
This is the SendMessage API call that is being used:
Public Declare Function SendMessage Lib "user32" Alias
"SendMessageA" _ (ByVal hWnd As Long, ByVal wMsg As Long, ByVal
wParam As Long, lParam As Any) _
As Long
Try passing strFolder ByVal. Right now it defaults to ByRef, so what you're setting the text to is just a memory address...
lngSM = SendMessage(lngHwnd, WM_SETTEXT, 0, ByVal strFolder)
Or change the Declare to 'ByVal lParam'.
--
Jim Mack
MicroDexterity Inc
www.microdexterity.com
.I'm using FindWindow and SendMessage in VB6 to automate an
installation. Everything works fine until I try to set a path in an
Edit box:
strFolder = "C:\Windows\Systems32\Drivers"
' Set Edit text box with path:
lngSM = SendMessage(lngHwnd, WM_SETTEXT, 0, strFolder)
Instead of setting the path, it sets 3 characters, an "O" with a "^"
on top, an "a" with ".." above, and an open square (like a checkbox).
Any ideas?
Thanks,
--
Bill Baker
- Prev by Date: Re: Page Layout when printing from VB
- Next by Date: Re: WM_SETTEXT sets garbage characters
- Previous by thread: Inserting a record into an Access Database
- Next by thread: Re: WM_SETTEXT sets garbage characters
- Index(es):
Relevant Pages
|