From: Bernhard Mayer on 8 Jun 2010 07:16 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 8 Jun 2010 18:36 Can you show us the code please? "Bernhard Mayer" <Idonotexisthere(a)nowhere.com> wrote in message 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: Bernhard Mayer on 9 Jun 2010 02:33 Meanwhile I found out why this happened; it was due to focussing the first SLE on a tab control which had the WS_DISABLED style undone immediately before. 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()? "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 9 Jun 2010 04:58 Bernhard. There is no such thing. PostMessage() sends the message immediately and only returns when complete. SendMessage() simply places the message into the queue. But both still only with a queue and don't really offer 'delays' as such. It is the sequence of messages that is important. Geoff "Bernhard Mayer" <Idonotexisthere(a)nowhere.com> wrote in message news:4c0f35b4$0$12848$91cee783(a)newsreader04.highway.telekom.at: > Meanwhile I found out why this happened; it was due to focussing the first > SLE on a tab control which had the WS_DISABLED style undone immediately > before. > > 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()? > > "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: Stephen Quinn on 9 Jun 2010 05:49 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
|
Next
|
Last
Pages: 1 2 Prev: bBrowser and SQL Server - append() Next: How to catch Mouse Doubleclick |