I need an editbox which
* has a canvas to display background image
* limited to accept a certain range of keystrokes
* prevent user from selecting its content by mouse
I descended my component from TCustomContol and captured KeyDown method:
procedure TMMEdit.KeyDown(var Key: Word; Shift: TShiftState);
if (Key = VK_Back) then begin
if (length(fText)>0) then Delete( fText, Length(fText), 1);
fText:= fText+ Char( key );
My main problem is that fText:= fText+ Char( key ); doesn't work correctly for special characters like á, é, Õ, Ö.
How can I handle these OEM characters correctly?