flat assembler
Message board for the users of flat assembler.

Index > Windows > last active window

Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 8906
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
hi there Laughing
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 Wink
Post 09 Dec 2006, 23:37
View user's profile Send private message Reply with quote
LocoDelAssembly
Your 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.

WM_SETFOCUS
hwndLoseFocus = (HWND) wParam; // handle of window losing focus


Parameters

hwndLoseFocus

Value of wParam. Identifies the window that has lost the keyboard focus (may be NULL).
[/edit]
Post 09 Dec 2006, 23:42
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8906
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
okie, thanks locodelassembly Smile
would try that
Post 10 Dec 2006, 00:12
View user's profile Send private message Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: usa
coconut
maybe a WH_SHELL hook or WH_GETMESSAGE HOOK would work, ill try to make an example
Post 10 Dec 2006, 00:23
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8906
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
bump to get help Wink
btw, the keypad is targetted to be used with touch screen monitor Smile
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 Wink

see ya.
Post 11 Dec 2006, 05:48
View user's profile Send private message Reply with quote
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.
Post 11 Dec 2006, 13:39
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8906
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
yo yo,
based on a thread i set in xtreme vb, volte had helped me to achieve what i wanted to do Wink thanks a lot to him

http://www.xtremevbtalk.com/showthread.php?t=276107
using the WS_EX_NOACTIVATE trick.
Post 12 Dec 2006, 06:37
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.