Chinaunix首页 | 论坛 | 博客
  • 博客访问: 628082
  • 博文数量: 603
  • 博客积分: 4000
  • 博客等级: 上校
  • 技术积分: 4940
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-17 11:04
文章分类

全部博文(603)

文章存档

2011年(1)

2008年(602)

我的朋友

分类:

2008-09-17 11:13:10


()
- ()
-- ()


由 淮水流觞 在 2008-08-28 14:36 发表:

颜色对话框初始化选择

1 --------------------------------------------------------------------------------
CColorDialog dlg(m_clr, 0, this);
if(IDOK==dlg.DoModal())
{
m_clr=dlg.m_cc.rgbResult;
};
2----------------------------------------------------------------------------------------------------
CColorDialog dlg;
dlg.m_cc.Flags |=CC_RGBINIT;
if(IDOK==dlg.DoModal())
{
m_clr=dlg.m_cc.rgbResult;
};
为什么第二套方案不能初始化颜色的选择呢?


由 smilebit 在 2008-08-28 18:47 发表:

标志应当在构造时设置。而不是之后。

__________________
为祖国荣誉而战


由 淮水流觞 在 2008-08-28 23:13 发表:

原因似乎不是哦!

// The code below uses CColorDialog::m_cc data member to
// customize the settings of CColorDialog. The CColorDialog will
// be shown as full open and with red as the selected color.
CColorDialog dlg;
dlg.m_cc.Flags |= CC_FULLOPEN | CC_RGBINIT;
dlg.m_cc.rgbResult = RGB(255, 0, 0);
dlg.DoModal();

MSDN上的例子。


全部时间均为北京时间. 现在时间是15:09 .

Powered by: vBulletin Version 2.2.8
Translated and hacked by:
Copyright © Jelsoft Enterprises Limited 2000, 2001.


--------------------next---------------------

阅读(322) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~