From: Chris Pyrgas on

Hi Bernhard,

> I can now work around the effect by doing some PostMessage() with
> WM_NextDlgCtl after oSLE:SetFocus() but does anyone know how to do
> something like sending a "delayed" SetFocus message to a control via
> PostMessage()?

If I understand you correctly, I think you just need to PostMessage() a
WM_USER (or WM_USER + constant) message to the control and then, in your
control's Dispatch() method, when you intercept that message, issue a
SetFocus().

regards,
Chris


>
> "Bernhard Mayer" <Idonotexisthere(a)nowhere.com> schrieb im Newsbeitrag
> news:4c0e2683$0$13739$91cee783(a)newsreader03.highway.telekom.at...
>> Dear fellow VO'ers!
>>
>> If ShowCaret(<Handle of SLE>) fails and GetLastError() returns 5 (Which
>> is normally an "Access denied" error): Can anyone tell me what this means
>> in this context? The control definitely has the focus, ShowCaret() is
>> called by a derived SingleLineEdit:MouseButtonUp() or
>> SingleLineEdit:FocusChange() whereas FocusChangeEvent:GotFocus is true.
>>
>> Hope that someone can help me.
>>
>> BR
>> Bernhard
>


From: Geoff Schaller on
I beg your pardon.
Quite right.



"Stephen Quinn" <stevejqNO(a)bigpondSPAM.net.au> wrote in message
news:hsJPn.1899$Ls1.769(a)news-server.bigpond.net.au:

> Geoff
>
>
> > There is no such thing. PostMessage() sends the message immediately and
> > only returns when complete. SendMessage() simply places the message into
> > the queue.
>
>
> Thats backwards I think
> Postmessage() sends to the queue and returns without waiting for a
> result
> SendMessage() sends to the queue (or is it to the control?) and waits
> for a result.
>
> CYA
> Steve

From: Bernhard Mayer on
Hi Chris,

thanks, that might be a solution.

BR,
Bernhard
"Chris Pyrgas" <cpc(a)anadelta.com> schrieb im Newsbeitrag
news:hunpql$l2k$1(a)mouse.otenet.gr...
>
> Hi Bernhard,
>
>> I can now work around the effect by doing some PostMessage() with
>> WM_NextDlgCtl after oSLE:SetFocus() but does anyone know how to do
>> something like sending a "delayed" SetFocus message to a control via
>> PostMessage()?
>
> If I understand you correctly, I think you just need to PostMessage() a
> WM_USER (or WM_USER + constant) message to the control and then, in your
> control's Dispatch() method, when you intercept that message, issue a
> SetFocus().
>
> regards,
> Chris
>
>
>>
>> "Bernhard Mayer" <Idonotexisthere(a)nowhere.com> schrieb im Newsbeitrag
>> news:4c0e2683$0$13739$91cee783(a)newsreader03.highway.telekom.at...
>>> Dear fellow VO'ers!
>>>
>>> If ShowCaret(<Handle of SLE>) fails and GetLastError() returns 5 (Which
>>> is normally an "Access denied" error): Can anyone tell me what this
>>> means in this context? The control definitely has the focus, ShowCaret()
>>> is called by a derived SingleLineEdit:MouseButtonUp() or
>>> SingleLineEdit:FocusChange() whereas FocusChangeEvent:GotFocus is true.
>>>
>>> Hope that someone can help me.
>>>
>>> BR
>>> Bernhard
>>
>
>