如何链接 C++ (Visual Studio 2010) 到图像输出事件侦听器?
我正在用 C++ 编写一个非常简单的程序来监听键盘输入,但是我想要输出的内容比我预期的要困难得多。对于我按下的每个键,我希望屏幕上出现一个图像(特定于该键)。例如,假设如果我按“O”键,地球的图像就会出现在我的屏幕上。
实现这一目标的最佳方法是什么?谢谢!
I am writing a very simple program in C++ that listens to keyboard input, but what I want to output is much more difficult than I expected. For every key I press, I want an image (specific to the key) to appear on the screen. For example, let's say if I press the "O" key, an image of Earth appears on my screen.
What's the best way to achieve this? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可以通过分层窗口实现。我创建了一个 Win32 项目作为演示。您可以在此处找到代码和说明。
基本上,您必须:
检查我的链接以获取问题的解决方案。
This is possible with layered windows. I have created a Win32 project as a demo. You can find the code and explanations here.
Basically you have to:
Check my link for a solution to your problem.