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

Managed C++/CLI

 
Questiongcnew and delete Pin
John Robert Wilk27-Feb-11 6:10
John Robert Wilk27-Feb-11 6:10 
AnswerRe: gcnew and delete Pin
N a v a n e e t h27-Feb-11 6:32
N a v a n e e t h27-Feb-11 6:32 
GeneralRe: gcnew and delete Pin
John Robert Wilk27-Feb-11 6:48
John Robert Wilk27-Feb-11 6:48 
QuestionEquivqlent of MSXML.XMLHTTPRequest Pin
T.RATHA KRISHNAN25-Feb-11 0:18
T.RATHA KRISHNAN25-Feb-11 0:18 
AnswerRe: Equivqlent of MSXML.XMLHTTPRequest Pin
N a v a n e e t h27-Feb-11 6:35
N a v a n e e t h27-Feb-11 6:35 
GeneralRe: Equivqlent of MSXML.XMLHTTPRequest Pin
T.RATHA KRISHNAN28-Feb-11 0:26
T.RATHA KRISHNAN28-Feb-11 0:26 
QuestionConfusing between Native and Managed !?? Pin
anti.AS23-Feb-11 1:28
anti.AS23-Feb-11 1:28 
AnswerRe: Confusing between Native and Managed !?? Pin
N a v a n e e t h23-Feb-11 17:45
N a v a n e e t h23-Feb-11 17:45 
GeneralRe: Confusing between Native and Managed !?? Pin
anti.AS24-Feb-11 7:10
anti.AS24-Feb-11 7:10 
QuestionReading an XML file Pin
T.RATHA KRISHNAN20-Feb-11 22:29
T.RATHA KRISHNAN20-Feb-11 22:29 
AnswerRe: Reading an XML file Pin
John Schroedl21-Feb-11 4:31
professionalJohn Schroedl21-Feb-11 4:31 
QuestionIs there a better way to do this? Pin
John Schroedl18-Feb-11 10:34
professionalJohn Schroedl18-Feb-11 10:34 
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 

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.