如何从剪贴板粘贴文本?
我有代码;
HWND MShwnd = FindWindowA("MapleStoryClass", NULL);
PostMessage(MShwnd, WM_KEYDOWN, 0x09, MapVirtualKeyA(0x09, 0) << 16);
效果很好。在此之前,我将一段文本复制到剪贴板。
我想知道的是如何使用 postmessage 并粘贴文本。
我到处找了也没明白。
谢谢。
I have the code;
HWND MShwnd = FindWindowA("MapleStoryClass", NULL);
PostMessage(MShwnd, WM_KEYDOWN, 0x09, MapVirtualKeyA(0x09, 0) << 16);
which works just fine. Before hand, I copied to the clipboard a text.
What I want to know is how can I use postmessage and paste the text.
I searched everywhere and do not understand.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个 C# 代码,将其转换或使用我的代码制作 ac# dll:
(您需要添加引用
Microsoft.VisualBasic
)更新C++代码:
更新2
我想您需要本机代码,所以您没有使用我不需要句柄的代码,加上如果你实现了
HWND MShwnd = FindWindowA("MapleStoryClass", NULL);
这样你就有了一个句柄...无论如何我建议最后一个方法是 下列的:This is a C# code convert it or make a c# dll with my code:
(You need to add reference
Microsoft.VisualBasic
)Update C++ code :
Update 2
I suppose that you need native code, so you didn't use my code up there that didn't require a handle, plus if you acheive
HWND MShwnd = FindWindowA("MapleStoryClass", NULL);
so you have a handle... Any way i suggest one last method is the following: