如何在单击我自己创建的窗口上的菜单时在我的窗口上显示内容 [英] How to display the content on my window on clicking the menu on my own createdwindow

查看:80
本文介绍了如何在单击我自己创建的窗口上的菜单时在我的窗口上显示内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Coders,

我在Win32 API的代码块中用c ++编写程序。我创建了一个名为New的菜单窗口,其中有一个选项Display(即New-> Display)。



我希望它点击显示一些数据应该在同一个窗口显示(&不要画画)(不是像Messagbox那样在另一个窗口中)。



请你告诉我我怎么能这样做,如果你有任何关于你管视频的链接对我有帮助。



谢谢预期



我尝试过:



我尝试过IDM,但代码块不支持。

Hello Coders,
I am writing a program in c++ in code blocks on "Win32 API". I have created a window with menu named "New" and there is a option in it "Display"(i.e. New->Display).

I want that on clicking the "Display" some data should be displayed( & not paint) on the same window(not in another window like messagbox).

Please Can u tell me how can I do this and if u have any link to video on you tube helpful for me.

Thank you Anticipation

What I have tried:

I have tried IDM but it was not supported in code blocks.

推荐答案

在该窗口上显示内容的唯一方法是使用WM_PAINT事件。许多教程都详细解释了这一点,例如 EFNet #Winprog [ ^ ], Win32编程 - 功能X [ ^ ]等。
The only way to display things on that window is by using the WM_PAINT event. This is explained in detail in lots of tutorials, such as EFNet #Winprog[^], Win32 Programming - FunctionX[^] etc.


这篇关于如何在单击我自己创建的窗口上的菜单时在我的窗口上显示内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆