SendMessage - Tab not working, well kinda not
  Home FAQ Contact Sign in
borland.public.delphi.vcl.components.using.win32 only
 
Advanced search
POPULAR GROUPS

more...

borland.public ... using.win32 Profile…
 Up
SendMessage - Tab not working, well kinda not         


Author: orangecat
Date: May 20, 2008 15:40

Hi,

I hope this is the appropriate group.

I have an app that uses SendMessage (thanks, Peter Below) to send data
to a waiting app.

So far SendMessage with Data and "Enter" works fine. I want to be able
to Tab to the next data field in the waiting app.

The following works fine to send a CrLf to a Memo on the waiting app

SendMessage(hFocusWin,WM_CHAR,13,0);

Using the following it sends a Tab-character [no real surprise there
:-)] and indents the text rather than tabbing to the next field.

SendMessage(hFocusWin,WM_CHAR,9,0);

What should I be sending here to force the waiting app to move focus
to the next input field?

I have checked the API help but cannot seem to work out how to do
this. I looked at WM_SYSCHAR but that appears to be used in
conjunction with the Alt key.

I would also like to be able to send Alt+M for Menu etc too if you can
help with that.
Show full article (1.11Kb)
3 Comments
Re: SendMessage - Tab not working, well kinda not         


Author: Remy Lebeau (TeamB)
Date: May 20, 2008 16:07

cableone.net> wrote in message
news:sji6341q8cv2u321b49abdcoelego8prgt@4ax.com...
> Using the following it sends a Tab-character [no real surprise
> there :-)] and indents the text rather than tabbing to the next field.
>
> SendMessage(hFocusWin,WM_CHAR,9,0);

If a Memo control returns DLGC_WANTTAB in response to the WM_GETDLGCODE
message (in VCL terms, setting the TMemo.WantTabs property to true), then
the Memo accepts tab characters as typed input, and thus you can't switch to
another field by tabbing when the Memo has focus.
> What should I be sending here to force the waiting app to
> move focus to the next input field?

Well, first off, is the waiting app a VCL app or not? Tab ordering is
controlled by the application framework, not the OS. So it makes a big
difference what kind of framework is being used by the application.

Gambit
no comments
Re: SendMessage - Tab not working, well kinda not         


Author: Peter Below (TeamB)
Date: May 21, 2008 10:36

orangecat@cableone.net wrote:
> I have an app that uses SendMessage (thanks, Peter Below) to send data
> to a waiting app.
>
> So far SendMessage with Data and "Enter" works fine. I want to be able
> to Tab to the next data field in the waiting app.
>
> Using the following it sends a Tab-character [no real surprise there
> :-)] and indents the text rather than tabbing to the next field.
>
> SendMessage(hFocusWin,WM_CHAR,9,0);
>
> What should I be sending here to force the waiting app to move focus
> to the next input field?
Show full article (7.62Kb)
no comments
Re: SendMessage - Tab not working, well kinda not         


Author: Peter Below (TeamB)
Date: May 22, 2008 00:46

Peter Below (TeamB) wrote:
>> What should I be sending here to force the waiting app to move focus
>> to the next input field?
>
> You could try to send a WM_NEXTDLGCTL message, but not to the focused
> control. This message...
Show full article (1.39Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
I want idMso for "Mailing" Tab button to add this button in custom ribbon tabmicrosoft.public.word.docmanagement ·
Change "Tab Color" when using <cflayout type="tab">macromedia.coldfusion.cfml_general_discussion ·