Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 8 Jahren, 9 Monaten
Letzter Beitrag:
vor 8 Jahren, 9 Monaten
Beteiligte Autoren:
Hans60, Jeff Graham

Virtual Keyboard PPC

Startbeitrag von Hans60 am 03.11.2009 20:00

under WinDev Mobile there is a sample of a Virtual keyboard. I do not quite understand how it should work as the initial page of the sample just shows some edit fields. How is that to be used?

One of my windows has a numeric block
1 2 3
4 5 6
7 8 9

when a key is pressed it should enter the respective number in to the currently selected edit field.

Each key has the following code AssignControl(MySelf..Caption)
and the procedure looks like this

PROCEDURE AssignControl(psValue)
// Save the clipboard
sClipBoard is string
sClipBoard = Clipboard()

// the text to enter is copied to the clipboard

// the content of the clipboard is copied to the control (WM_PASTE = 0x302)
SendMessage(Handle(CurrentField()), 0x302, Null, Null)

// Restore the clipboard

I have tried to insert the clipboard content in to the field s... but must do something wrong, I do not understand the following line

// the content of the clipboard is copied to the control (WM_PASTE = 0x302)
SendMessage(Handle(CurrentField()), 0x302, Null, Null)...

Can someone explain how the respective character gets assigned to the edit field?

many thanks


Hi Hans,

The caption is the "key" that it is going to emulate. So the caption is passed as the psValue parameter. That parameter is put in the clipboard. Then, if you look in the WinDev Mobile\Personal\Winconst.wl file, you will see that 0x0302 is the WM_PASTE event. So the SendMessage... causes the Clipboard to be pasted in the current field.


von Jeff Graham - am 03.11.2009 22:02
Hi Jeff,
thanks for the 0x0302 explanation.

Does that mean it will not work in the PPC simulator only on the PPC? Because on the Simulator it does not insert any character...

As far as I understand the code there is no need to assign it to any particular field due to Focus and "SendMessage(Handle(CurrentField())"


von Hans60 - am 04.11.2009 08:58
ok found the solution... it had to be installed on PPC


von Hans60 - am 04.11.2009 13:22
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.