问题描述
我在SDI项目c ++工作。
I am working in SDI project c++.
它包含4个窗口
1。 view.h
1. view.h
2。 doc.h
3。主框架
4。 output.h
4. output.h
我在这里添加了一个对话框。
i have added one dialog in this.
我想做的是我想从对话框中获取字符串并显示它在输出窗口。
what i want to do is that i want to take string from dialog and display it in output window.
如何做到这一点需要帮助??
how to do this need help??
推荐答案
什么是output.h?你如何声明输出窗口?在SDI中,您通常有一个视图。在那里你可以写文字,例如在OnPaint中。
what is output.h? How do you declare the output window? In an SDI, you normally have one view. There you can write text, e.g. in OnPaint.
在对话框中,通过资源编辑器添加CEdit,为其设置CString变量,在DoModal之后,将字符串保存到视图或doc的成员变量中,然后让视图重绘。
In the dialog you add a CEdit through resource editor, set a CString variable to it, and after DoModal you save the string to a member variable of your view or doc and let the view repaint.
问候,Guido
这篇关于如何在SDI MFC C ++的输出窗口中显示按摩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!