Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VC++.NET MFC:how to associate Edit control and button

Status
Not open for further replies.

billows.wang

Newbie level 4
Joined
Apr 16, 2007
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
Hi all,

I want to make out a dialog like this:there are one edit control "File Name" and one button "browser" in the dialog,which is a parent dialog.when press the "browser" button in the dialog, a CFileDialog child dialog pops up,then I could choose a certain file in the dialog, and click "open" to get the file.My question is that how could I display the file name in the edit control "File Name" in the parent dialog?

BRs
 

ok,I have gotten the answer,and i'd like to share it with all of you:
...
DDX_Text(pDX, IDC_EDIT_FILE, ConfigFileName);
...
void CClassName::OnBnClickedButtonBrowser()
{
// TODO: Add your control notification handler code here
CSpecFileDlg dlgFile(TRUE, NULL, "*.inc");
if( dlgFile.DoModal() == IDOK )
{
ConfigFileName = dlgFile.GetFileName();
}
UpdateData(FALSE);
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top