Click here to Skip to main content
15,896,726 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Is there a better way to do this? Pin
Philippe Mori10-Mar-11 15:08
Philippe Mori10-Mar-11 15:08 
GeneralRe: Is there a better way to do this? Pin
John Schroedl10-Mar-11 15:20
professionalJohn Schroedl10-Mar-11 15:20 
QuestionNetwork Communication Pin
pix_programmer17-Feb-11 18:50
pix_programmer17-Feb-11 18:50 
AnswerCross-post warning Pin
Peter_in_278017-Feb-11 19:48
professionalPeter_in_278017-Feb-11 19:48 
QuestionHow to perform the debugging operation in visual studio 6.0 in Windows 7 64-bit environment. Pin
lucky_122116-Feb-11 22:26
lucky_122116-Feb-11 22:26 
Questionstatic_cast vs cli::safe_cast Pin
pix_programmer16-Feb-11 20:18
pix_programmer16-Feb-11 20:18 
AnswerRe: static_cast vs cli::safe_cast Pin
ian__lindsay16-Feb-11 22:02
ian__lindsay16-Feb-11 22:02 
QuestionPreselecting files in a CFileDialog Pin
Hayden Fisher14-Feb-11 21:31
Hayden Fisher14-Feb-11 21:31 
Just wondering how and if you can pre-select multiple files as the dialog opens? Do you place a list of them in the Initial Filename area, as I've tried this already the answer seems to be, No.
Am I missing something?

Basically I'd like a user to be able to select multiple files, I then do some checking of the filenames and if one of these checks comes back false, I want to reload this dialog with the files that the user had previously selected.

Any help would be greatly appreciated
Hayden

CFileDialog dlg(FALSE/*Open=TRUE Save=False*/,NULL/*Filename Extension*/,""/*Initial Filename*/,OFN_ENABLESIZING|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_ALLOWMULTISELECT/*Flags*/,"All Files(*.*)|*.*||"/*Filetype Filter*/);
	
	const int nBufferSize = 128*1024; // May be excessive?
	TCHAR *szNewBuffer = new TCHAR[nBufferSize];
	memset(szNewBuffer, 0, sizeof(TCHAR) * nBufferSize);
	dlg.m_ofn.lpstrFile = szNewBuffer;
	dlg.m_ofn.nMaxFile = nBufferSize - 1;
	
	if (dlg.DoModal() == IDOK)
	{
		POSITION pos = dlg.GetStartPosition();
		CString fullpath;
		CString filenametemp;
		CString filename;
		int nLastSlashPos;

		filePaths = "";
		fileNameList = "";
		
		while (pos)
		{
			fullpath = dlg.GetNextPathName(pos);

			nLastSlashPos = fullpath.ReverseFind('\\');
			if(nLastSlashPos >= 0)
			{
				filename = fullpath.Mid(nLastSlashPos+1);
			}

			if (filePaths != "")
			{
				filePaths = filePaths + "|";
				fileNameList = fileNameList + " ";
			}
			filePaths = filePaths + fullpath;
			fileNameList = fileNameList + '"' + filename + '"';
		}
	}

QuestionSpliting a String in C++/CLI Pin
T.RATHA KRISHNAN14-Feb-11 20:03
T.RATHA KRISHNAN14-Feb-11 20:03 
AnswerRe: Spliting a String in C++/CLI Pin
Ger Hayden14-Feb-11 21:59
Ger Hayden14-Feb-11 21:59 
GeneralRe: Spliting a String in C++/CLI Pin
T.RATHA KRISHNAN14-Feb-11 22:13
T.RATHA KRISHNAN14-Feb-11 22:13 
GeneralRe: Spliting a String in C++/CLI Pin
Ger Hayden15-Feb-11 6:01
Ger Hayden15-Feb-11 6:01 
GeneralRe: Spliting a String in C++/CLI Pin
Richard MacCutchan15-Feb-11 23:24
mveRichard MacCutchan15-Feb-11 23:24 
AnswerRe: Spliting a String in C++/CLI Pin
John Schroedl15-Feb-11 10:16
professionalJohn Schroedl15-Feb-11 10:16 
QuestionBadImageFormat exception because of just class definition. Pin
progDes10-Feb-11 1:44
progDes10-Feb-11 1:44 
AnswerRe: BadImageFormat exception because of just class definition. Pin
progDes10-Feb-11 17:09
progDes10-Feb-11 17:09 
QuestionAdding Member Functions to the .CPP Pin
Ger Hayden10-Feb-11 0:30
Ger Hayden10-Feb-11 0:30 
QuestionAdding a member function in VC++ Express 2010 Pin
Ger Hayden10-Feb-11 0:27
Ger Hayden10-Feb-11 0:27 
QuestionInline processor assembly language in C++/CLI Pin
anti.AS7-Feb-11 21:54
anti.AS7-Feb-11 21:54 
AnswerRe: Inline processor assembly language in C++/CLI Pin
John Schroedl8-Feb-11 5:42
professionalJohn Schroedl8-Feb-11 5:42 
QuestionDifference between IJW and #pragma unmanaged ? Pin
anti.AS7-Feb-11 5:10
anti.AS7-Feb-11 5:10 
AnswerRe: Difference between IJW and #pragma unmanaged ? Pin
Nish Nishant7-Feb-11 5:24
sitebuilderNish Nishant7-Feb-11 5:24 
GeneralRe: Difference between IJW and #pragma unmanaged ? Pin
anti.AS7-Feb-11 9:08
anti.AS7-Feb-11 9:08 
GeneralRe: Difference between IJW and #pragma unmanaged ? Pin
Nish Nishant7-Feb-11 9:16
sitebuilderNish Nishant7-Feb-11 9:16 
GeneralRe: Difference between IJW and #pragma unmanaged ? Pin
anti.AS7-Feb-11 9:36
anti.AS7-Feb-11 9:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.