hi there
let say if i want to program a keypad window.
so whenever the user press the button on my keypad (so i need to know what is the last active window, so that i could just send text to it and re focus it.

any idea what api should i call to get the last active window?

thank you

09 Dec 2006, 23:37

LocoDelAssemblyYour code has a bug

Joined: 06 May 2005
Posts: 4633
Location: Argentina

LocoDelAssembly

GetNextWindow?

[edit] Maybe this will work better

Quote:

The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus.

bump to get help
btw, the keypad is targetted to be used with touch screen monitor
i know i can code keypad that works with my application, maybe through register message and post message to my app only, but i would like to have a keypad that could work with other textboxes, or etc input controls

see ya.

11 Dec 2006, 05:48

cod3b453

Joined: 25 Aug 2004
Posts: 619

cod3b453

if WM_SETFOCUS doesn't work try SetTimer and GetForegroundWindow to get the last window that wasnt your app then it can send keys and SetForgroundWindow afterwards.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum