CFileDialog :: HideControl()损坏 [英] CFileDialog::HideControl() broken

查看:84
本文介绍了CFileDialog :: HideControl()损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在一个较旧的(MSVC ++ 6.0)项目中,我使用HideControl(edt1)隐藏了CFileDialog派生类中的文件名编辑控件,该类当时运行良好.当我使用MSDEV2008编译该项目时,代码符合OK,但控件不再隐藏.

我隐藏的其他控件似乎可以正常工作,只是"edt1"不会消失!

这里的代码是:

Hi,

In an older (MSVC++6.0) project I used HideControl(edt1) to hide the filename edit control in a CFileDialog derrived class, which worked fine at the time.

When I compile this project with MSDEV2008, the code complies OK but control is no longer hidden.

Other controls that I have hidden appear to work OK, its just ''edt1'' that wont go away!

Heres my code:

<br />BOOL CFolderDialog::OnInitDialog() <br />{<br />	CFileDialog::OnInitDialog();<br />	GetParent()->;SetWindowText(_T("Select Folder"));<br />	SetControlText(IDOK, _T("OK"));<br /><br />	// Hide the "Save As" static text and list control<br />	// Hide the "File Type" static text and the combobox<br />	HideControl(stc2);<br />	HideControl(stc3);<br />	HideControl(cmb1);<br />	HideControl(edt1);<br />	return TRUE;<br />}<br />



还有其他人遇到吗? :(

TIA

Tony



Anyone else come across this? :(

TIA

Tony

推荐答案

在我刚刚构建的示例应用程序上使用Spy ++,似乎不是edt1 ,您现在要使用cmb13(0x47c).我猜他们认为,由于该字段实际上是(现在)组合框,因此使用它会是更好的ID.

Using Spy++ on a sample application I just built, it would seem that instead of edt1, you now want to use cmb13 (0x47c). I guess they decided that as that field is (now) actually a combo-box, that would be a better ID to use.


这篇关于CFileDialog :: HideControl()损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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