IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
how to receive WM_KEYDOWN messages from my ui_element?
vroomvroom
post Feb 29 2012, 09:06
Post #1





Group: Members
Posts: 6
Joined: 15-June 11
Member No.: 91531



Hi,

Is there a way to receive WM_KEYDOWN (or WM_CHAR, or something along those lines) from my ui_element? I've tried adding MSG_WM_KEYDOWN to my MSG_MAP but the KEYDOWN messages do not seem to get to my ui_element. I imagine that foobar is not "routing" them. Is there a way to make this work?

My use case is like this: I have a bunch of vertical scrollbars in my ui_element that I would like to control via keyboard when my ui_element has focus (e.g. Q & A for up & down of first scrollbar, W & S for the second, E & D for the third, etc)
I imagine I could register a bunch of menu items and set them via preferences -> keyboard shortcuts, but is there a better way to do it?

Thanks!
Go to the top of the page
+Quote Post
kerpondile
post Mar 18 2012, 10:41
Post #2





Group: Developer
Posts: 147
Joined: 26-January 04
Member No.: 11525




You might need to provide OnGetDlgCode to ensure that you receive all the needed keycodes, see
https://github.com/ssalonen/foo_queueconten...nts/listbox.cpp
https://github.com/ssalonen/foo_queueconten...tents/listbox.h

for an example. Also are you sure you have the focus in your ui component? I think I needed to call SetFocus in OnKeyDown of my list box element (see listbox.cpp)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th December 2014 - 18:39