Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
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 />


Anyone else come across this? :(

TIA

Tony
Posted

1 solution

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.

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900