?
Solved

Keystrokes in Listbox

Posted on 1997-04-28
7
Medium Priority
?
356 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 150 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

801 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