Solved

Keystrokes in Listbox

Posted on 1997-04-28
7
336 Views
Last Modified: 2013-12-04
I want to handle all keystrokes while a TLISTBOX from
the Pascal-OWL (WIN3.11) has the focus myself.
I tried already wm_char, wm_keydown,
lbs_wantkeyboardinput, wm_vkeytoitem and so on, but
I got always the standard-key management from WIN .
Any Idea?

Mircea
0
Comment
Question by:nmm
  • 4
  • 3
7 Comments
 

Expert Comment

by:gurumike
ID: 1396954
I'm not familiar with Delphi (I use BC++), but did you write your own listbox control or are you using the windows-standard one?
0
 

Author Comment

by:nmm
ID: 1396955
Gurumike: The standard-one from OWL...
0
 

Accepted Solution

by:
gurumike earned 50 total points
ID: 1396956
This answer might suck, but:
Derive your own class from TListBox that responds to the WM_KEYDOWN (or WM_CHAR) message.  You can do your special processing there, or you can call the default processing for TListBox then forward the message to the parent window for extra processing.
It's kind of puzzling that LBS_WANTKEYBOARDINPUT didn't work.  The documentation I have with BC++ says that the message is sent to the application object - so if that's not where your special processing occurs, try moving/adding it there.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:nmm
ID: 1396957
Hm. I must say: all you recomend I tried already.
The listbox behaves every time in the standard-TListbox manner.
*After* doing so it tries to process my code, but this is to late. What I want is simple: if you press a sequence of keys I
want the listbox to move the selection to the entry starting with
this sequence. But it moves allways to the entry which starts with the *first character* of the sequence....

0
 

Expert Comment

by:gurumike
ID: 1396958
As I understand it, your code is being run, but it has no effect.  In which method is your special processing being run?  Actually, if you could send me the relevant source code at olsonmd@aureate.com, I'd like to take a look at it and see if I can spot the problem.
0
 

Author Comment

by:nmm
ID: 1396959
Thank you! But there are meanwhile several versions of the code
(none running well) and some of them are erased already.
I will try to make a ultimative one and send you in a few days...(unfortunately have to do other things before) Thanks again!

Mircea
0
 

Expert Comment

by:gurumike
ID: 1396960
Sounds good.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now