Dlg之DoModal
来源:互联网 发布:武装突袭3画面优化 编辑:程序博客网 时间:2024/06/10 12:51
下面是摘自MSDN中的一段.万变不离其宗
CColorDialog
基类:CObject
The CColorDialog class allows you to incorporate a color-selection dialog box into your application. A CColorDialog object is a dialog box with a list of colors that are defined for the display system. The user can select or create a particular color from the list, which is then reported back to the application when the dialog box exits.
To construct a CColorDialog object, use the provided constructor or derive a new class and use your own custom constructor.
Once the dialog box has been constructed, you can set or modify any values in the m_cc structure to initialize the values of the dialog box’s controls. The m_cc structure is of typeCHOOSECOLOR.
After initializing the dialog box’s controls, call the DoModal member function to display the dialog box and allow the user to select a color. DoModal returns the user’s selection of either the dialog box’s OK (IDOK) or Cancel (IDCANCEL) button.
If DoModal returns IDOK, you can use one of CColorDialog’s member functions to retrieve the information input by the user.
You can use the WindowsCommDlgExtendedError function to determine whether an error occurred during initialization of the dialog box and to learn more about the error.
CColorDialog relies on the COMMDLG.DLL file that ships with Windows versions 3.1 and later.
To customize the dialog box, derive a class from CColorDialog, provide a custom dialog template, and add a message map to process the notification messages from the extended controls. Any unprocessed messages should be passed to the base class.
Customizing the hook function is not required.
Note On some installations the CColorDialog object will not display with a gray background if you have used the framework to make other CDialog objects gray.
For more information on using CColorDialog, seeCommon Dialog Classes in Visual C++ Programmer's Guide.
- Dlg之DoModal
- dlg.domodal是不是把系统的线程挂起了(转载)
- MFC 模态对话框dlg.DoModal()返回值
- MFC 模态对话框dlg.DoModal()返回值(转)
- 解决不能单步调试dlg.DoModal()函数的问题
- MFC 模态对话框dlg.DoModal()返回值
- MFC 模态对话框dlg.DoModal()返回值
- 关于dlg.DoModal()==IDOk的理解
- MFC 模态对话框dlg.DoModal()返回值
- MFC 模态对话框dlg.DoModal()返回值
- MFC 模态对话框dlg.DoModal()返回值
- if (IDCANCEL==dlg.DoModal()) { return; }解释
- DoModal
- DoModal
- MFC 中dlg.DoModal()对话框移动到指定区域显示的一个解决办法
- 控制台应用程序调用MFC DLL产生的对话框,解决对话框dlg.DoModal报错问题
- 设置Dialog中Button的返回值------>Dlg.DoModal()的返回值
- MFC开发之m_pmainwnd和DoModal
- 高性能数据库应用程序的几个要点
- 如何学好编程-写给还在学校的学生
- 语义层之编辑风格
- 走好人生每一步
- 工控串口通讯设计的源码
- Dlg之DoModal
- 语义层设计之权限控制
- 所谓英雄,其实是一群心怀畏惧的人
- ssh删除的问题
- Error #1034: 强制转换类型失败:无法将 mx.managers::DragManagerImpl@141c5b81 转换为 mx.managers.IDragManager。
- Fedora 11 下安装openmotif
- 09-11-08:读一个文件,求其中单词个数。
- 深度和广度搜索
- 为什么Get-ChildItem的执行变慢了?[翻译]