Solved

Keystrokes in Listbox

Posted on 1997-04-28
7
353 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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 is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

691 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