🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9282

How to simulate the keyboard input

#9282
From: Sky
Date: Tue, 13 Jul 2004 06:26
21 lines
1662 bytes
Hi all

I have simulated some simple keyboard input in my application before.
just like input some character or simple control key(Enter, Space etc.)
WM_CHAR was used for character key and WM_KEYDOWN for control key

But now I want to simulate some complicated input
for example
1. I want to insert some Chinese character into a text box
obvious the WM_CHAR is not been used for double bytes character.
note: the text box does not support system paste(WM_PASTE is invalid)

2. how to simulate a hotkey input, for example Ctrl+V
I think of the WM_HOTKEY, post a WM_HOTKEY message to the text box,
but this message need a idHotKey parameter,
I do not know what the value should be set for the idHotKey.
note: the hotkey Ctrl+V was defined in my application.

Any hint will be great appreciated.

Sky
Technical Details
Message-ID: <40f38120$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d6e3f7cb717ce2e,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Sky" <akeehuang@163.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: How to simulate the keyboard input
Date: Tue, 13 Jul 2004 14:26:23 +0800
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 218.85.121.51
Message-ID: <40f38120$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089700128 218.85.121.51 (12 Jul 2004 23:28:48 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail