Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Friends,

I'm Trying To Design A System Wide Autocomplete Menu Showing Predictions Of The User Input As They Type.How To Implement It...

Example:-If I Type "Auto" In Keyboard The Prediction Menu Should Appear With Options Like Automatic,Automobile,etc...

I'm Trying It In VC++ Using Visual Studio.

Share Me Your Suggestions And References Please...


Thank You

What I have tried:

I Have Designed A Window Containing ListBox With Items Added To It...
Posted
Updated 9-Aug-18 2:22am

1 solution

You would have to install a global keyboard hook, track the active window to know when input goes to a different application or input control, and simulate key strokes upon auto completition.

How to do that can be found out with a simple web research:
SetWindowsHookEx function (Windows)[^]
SendInput function (Windows)[^]

But have you thought about possible side effects?

It is a security risk. Your service would also catch and store user names and passwords internally. For that reason I would not use it; especially when it provides an auto learning feature which stores entered strings not only temporarily.
 
Share this answer
 
Comments
srinivasankrishnaa 10-Aug-18 2:05am    
Is There Any Possibility Way To Design This Feature With Out Vulnearability So That The Use Might Benefit From It...
Jochen Arndt 10-Aug-18 3:00am    
Without: No
But knowing about this allows you to reduce the risks.
smeddinck 10-Aug-18 10:45am    
Yes, you may want to implement a quick-switch as a combination of an easy hotkey and a software button to enable users to temporarily disable all prediction (and learning + related tracking) activity.
Then make sure (this is a general GDPR requirement) that all learned data is carefully protected and that only crucial elements (if any) are transferred remotely.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900