Re: WM_SETTEXT works, changes text, but on button press window uses old text / not updating?
- From: Loucifer <incognito@xxxxxx>
- Date: 15 Nov 2005 10:01:17 -0600
Ok, I'll try this tonight. Thanks!
On Tue, 15 Nov 2005 16:13:00 +0100, "Juergen Thuemmler"
<thue@xxxxxxxxxxxxxxxx> wrote:
>>I am having an odd problem. I am using sendmessage with WM_SETTEXT to
>> send text to an edit control in a window. The call succeeds and I see
>> the new text in the control on the screen, but when I click Ok in the
>> window, it's clear the change didn't take because it pulls up the
>> wrong information using the default text that was there prior
>
>> Do I need to force the window to redraw or something?
>
>Depending on how the app is designed, you have to notify the parent window
>about the change:
>Private Declare Function GetDlgCtrlID& Lib "user32" (ByVal hwnd&)
>Const WM_COMMAND& = &H111
>Const EN_CHANGE = &H300&
>Dim dl&
>dl = GetDlgCtrlID(hEdit)
>dl = CLng(dl + &H10000 * EN_CHANGE)
>Call SendMessage(GetParent(hEdit), WM_COMMAND, dl, ByVal hEdit)
>
>Juergen.
>
.
- References:
- Prev by Date: Re: Read WAB
- Next by Date: Change the backcolor
- Previous by thread: Re: WM_SETTEXT works, changes text, but on button press window uses old text / not updating?
- Next by thread: contols top(left & right) edges rounded (imitating a form)
- Index(es):