CFileDialog弹出文件选择对话框

// 选择游戏路径
void XXX::OnBnClickedBtnSelectGamepath()
{
	CFileDialog GamePath(TRUE,NULL,NULL,0,L"*.exe|*.exe|");
	GamePath.DoModal();
	cs_gamepath = GamePath.GetPathName();
	cs_gamepath = cs_gamepath.Left(cs_gamepath.GetLength()-strlen(G_GameName)-1); 
	SetDlgItemText( IDC_GAME_PATH, cs_gamepath);

	//AfxMessageBox(cs_gamepath);

	UpdateData(false);	
}

你可能感兴趣的:(CFileDialog)