LCL-WinCE: Adds code to get some barcode scanners working with TEdit. Others still dont work.

git-svn-id: trunk@40630 -
This commit is contained in:
sekelsenmat 2013-03-24 11:53:58 +00:00
parent 78ab6ea5d0
commit 146aeb1092
3 changed files with 6 additions and 0 deletions

View File

@ -1478,6 +1478,9 @@ begin
begin
Msg := CN_KEYDOWN;
KeyData := LParam;
// Work around to get readings of some barcode scanners
if (WParam = 0) and (WinCEWidgetset.BarcodeScannerWorkaround) then
WParam := VK_0;
CharCode := Word(WParam);
Result := 0;
//DebugLn(Format('WM_KEYDOWN KeyData= %d CharCode= %d ',[KeyData,CharCode]));

View File

@ -215,6 +215,7 @@ type
{ Variables to be set by the user }
WinCETitlePolicy: TWinCETitlePolicy;
BarcodeScannerWorkaround: Boolean;
end;
{$I wincelistslh.inc}

View File

@ -52,6 +52,8 @@ begin
GetObject(Font, SizeOf(FMetrics.lfStatusFont), @FMetrics.lfStatusFont);
GetObject(Font, SizeOf(FMetrics.lfMenuFont), @FMetrics.lfMenuFont);
BarcodeScannerWorkaround := True;
WinCEWidgetSet := Self;
end;
{------------------------------------------------------------------------------