本文介绍了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
推荐答案
这篇关于CFileDialog :: HideControl()损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!