Click here to Skip to main content
15,894,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: projects that I can contribute towards? Pin
Jim Crafton7-Jan-03 18:05
Jim Crafton7-Jan-03 18:05 
QuestionMenu ??? Pin
dktu7-Jan-03 17:39
dktu7-Jan-03 17:39 
AnswerRe: Menu ??? Pin
l a u r e n7-Jan-03 17:57
l a u r e n7-Jan-03 17:57 
AnswerRe: Menu ??? Pin
Simon.W7-Jan-03 19:49
Simon.W7-Jan-03 19:49 
GeneralNeed help with dlls Pin
VanHlebar7-Jan-03 16:41
VanHlebar7-Jan-03 16:41 
GeneralRe: Need help with dlls Pin
Jim Crafton7-Jan-03 17:58
Jim Crafton7-Jan-03 17:58 
GeneralRe: Need help with dlls Pin
TOMTEFAR7-Jan-03 20:41
TOMTEFAR7-Jan-03 20:41 
GeneralListBox WM_VKEYTOITEM misbehaves! Pin
Brian Tietz7-Jan-03 15:30
Brian Tietz7-Jan-03 15:30 
I have a list box, and want the user to be able to search by typing, for example "pagescan" and have it match the first instance of "Read_Page_Scan_Enable" or "Write_Page_Scan_Enable". To accomplish this, I specified the LBS_WANTKEYBOARDINPUT style for the list box. In the WinProc for the parent window, I handle WM_VKEYTOITEM to build up a buffer of recent keys (with a timeout) and do a customized comparison (ignore case, ignore underscores, if not present in user-typed text, ignore Set_, Read_, Write_ in the list item text). I find the first match, or if none, consider the item at index 0 to match. I send an LB_SETCURSEL message to select the item, and dutifully return -2 from WinProc. The documentation for WM_VKEYTOITEM states:

"A return value of –2 indicates that the application handled all aspects of selecting the item and requires no further action by the list box."

And yet... If I type "pages" everything functions for p,a,g,e and I see the search narrow to the proper item (none of those letters are present as the first letter of any of the strings for any items in the list) but as soon as I type the S key (there is an item starting with S), the list box jumps to the first string starting with S!!! That is so completely screwed up...I think NT stands for "Not Tested"...does anyone know a workaround for this?

Thanks in advance,
Brian

GeneralRe: ListBox WM_VKEYTOITEM misbehaves! Pin
Brian Tietz7-Jan-03 16:01
Brian Tietz7-Jan-03 16:01 
GeneralRe: ListBox WM_VKEYTOITEM misbehaves! Pin
l a u r e n7-Jan-03 18:00
l a u r e n7-Jan-03 18:00 
GeneralCDataGrid Pin
Gilfrog7-Jan-03 12:11
Gilfrog7-Jan-03 12:11 
GeneralWM_TIMER and SetTimer Pin
Sunnygirl7-Jan-03 12:02
Sunnygirl7-Jan-03 12:02 
GeneralRe: WM_TIMER and SetTimer Pin
Mike Nordell7-Jan-03 15:49
Mike Nordell7-Jan-03 15:49 
GeneralArrays of control Pin
TV7-Jan-03 10:21
TV7-Jan-03 10:21 
GeneralRe: Arrays of control Pin
Alvaro Mendez7-Jan-03 11:50
Alvaro Mendez7-Jan-03 11:50 
GeneralRe: Arrays of control Pin
Heywood7-Jan-03 12:50
Heywood7-Jan-03 12:50 
GeneralRe: Arrays of control Pin
Andreas Saurwein8-Jan-03 0:38
Andreas Saurwein8-Jan-03 0:38 
Generalsystem, _wsystem calls within MSVC++ dialog applications Pin
rghin7-Jan-03 8:49
rghin7-Jan-03 8:49 
GeneralRe: system, _wsystem calls within MSVC++ dialog applications Pin
AlexO7-Jan-03 9:15
AlexO7-Jan-03 9:15 
GeneralRe: system, _wsystem calls within MSVC++ dialog applications Pin
valikac7-Jan-03 9:25
valikac7-Jan-03 9:25 
GeneralRe: system, _wsystem calls within MSVC++ dialog applications Pin
Alvaro Mendez7-Jan-03 9:25
Alvaro Mendez7-Jan-03 9:25 
GeneralWindows Hooks Pin
Nnamdi Onyeyiri7-Jan-03 8:07
Nnamdi Onyeyiri7-Jan-03 8:07 
GeneralRe: Windows Hooks Pin
Nish Nishant7-Jan-03 10:05
sitebuilderNish Nishant7-Jan-03 10:05 
GeneralRe: Windows Hooks Pin
Nnamdi Onyeyiri7-Jan-03 10:34
Nnamdi Onyeyiri7-Jan-03 10:34 
GeneralRe: Windows Hooks Pin
Nish Nishant7-Jan-03 11:31
sitebuilderNish Nishant7-Jan-03 11:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.