<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Normale Seite ohne Titel</title>
</head>
<body bgcolor="#FFFFFF">
<p>Hallo, ich möchte einem Terminalprogramm Tastaureingaben
simulieren. Dessen Fensterhandle habe ich zuvor ermittelt und in
Hwnd gespeichert. Der Code funktioniert soweit, nur den
Dezimalpunkt kriege ich nicht übergeben. Im Beispiel würde das
Terminalprogramm "<font color="#FF0000"><strong>ABC123</strong></font>"
statt "<font color="#FF0000"><strong>ABC.123</strong></font>"
empfangen. Wenn ich in der sprintf-Anweisung statt '.' ein
VK_DECIMAL ( 0x6E ) setze, wird "<font color="#FF0000"><strong>ABC,123</strong></font>"
empfangen. Wer weiß, wie man den Dezimalpunkt da rein kriegt ?
Danke !</p>
<pre>
LPSTR LoginString=n,ew char[80];
sprintf(LoginString,"<font color="#FF0000"><strong>ABC%c123</strong></font>",'<font
color="#FF0000"><strong>.</strong></font>');
BringWindowToTop(Hwnd);
for(int i=0; i<(int)strlen(LoginString); i++)
{
char c=LoginString[i];
keybd_event(c,0,0,0);
keybd_event(c,0,KEYEVENTF_KEYUP,0);
}
delete LoginString;
</pre>
</body>
</html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Normale Seite ohne Titel</title>
</head>
<body bgcolor="#FFFFFF">
<p>Hallo, ich möchte einem Terminalprogramm Tastaureingaben
simulieren. Dessen Fensterhandle habe ich zuvor ermittelt und in
Hwnd gespeichert. Der Code funktioniert soweit, nur den
Dezimalpunkt kriege ich nicht übergeben. Im Beispiel würde das
Terminalprogramm "<font color="#FF0000"><strong>ABC123</strong></font>"
statt "<font color="#FF0000"><strong>ABC.123</strong></font>"
empfangen. Wenn ich in der sprintf-Anweisung statt '.' ein
VK_DECIMAL ( 0x6E ) setze, wird "<font color="#FF0000"><strong>ABC,123</strong></font>"
empfangen. Wer weiß, wie man den Dezimalpunkt da rein kriegt ?
Danke !</p>
<pre>
LPSTR LoginString=n,ew char[80];
sprintf(LoginString,"<font color="#FF0000"><strong>ABC%c123</strong></font>",'<font
color="#FF0000"><strong>.</strong></font>');
BringWindowToTop(Hwnd);
for(int i=0; i<(int)strlen(LoginString); i++)
{
char c=LoginString[i];
keybd_event(c,0,0,0);
keybd_event(c,0,KEYEVENTF_KEYUP,0);
}
delete LoginString;
</pre>
</body>
</html>