本文介绍了如何用对话框控件中的值填充CList?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是一个绝对的初学者,正在尝试为ffmpeg多媒体编码器(使用Visual Studio 2008 SP1和MFC)制作一个简单的GUI.
有一个带有很少属性页的属性表(视频对话框,音频对话框等)
由于ffmpeg命令行包含开关/值对(例如-i input_file_name),因此我创建了一个结构,其中包含两个CString,switch和value,以及一个CList,其中包含这些结构.我将如何使用包含开关/值对的结构来馈送CList?可以从对话框控件中选择值,但是如何将开关存储在哪里以及如何将它们与适当的值相关联?用户更改某些设置时如何更新CList?
有没有更好的(阅读的,更简单的)方法来实现呢?
代码示例将不胜感激:)
谢谢.

Hello, I am an absolute beginner and trying to make a simple GUI to ffmpeg multimedia encoder (using Visual Studio 2008 SP1, MFC).
Have a property sheet with few property pages (video dialog, audio dialog etc.)
Since ffmpeg command line comprises of switch/value pairs (for example, -i input_file_name), I created a struct which holds two CStrings, switch and value, and a CList which holds these structs.
How would I go about feeding a CList with structs holding switch/value pairs? Values would be picked from dialog controls, but where do I store switches and how do I associate them with the appropriate values? How would I update CList when user changes some setting?
Is there a better (read, simpler) way to implement this?
Code examples will be much appreciated :)
Thanks.

推荐答案



这篇关于如何用对话框控件中的值填充CList?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 11:38