Click here to Skip to main content
15,886,752 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Detecting identical path names Pin
Randor 11-Sep-09 1:30
professional Randor 11-Sep-09 1:30 
GeneralRe: Detecting identical path names Pin
Mattias G11-Sep-09 1:36
Mattias G11-Sep-09 1:36 
GeneralRe: Detecting identical path names Pin
Randor 11-Sep-09 1:40
professional Randor 11-Sep-09 1:40 
GeneralRe: Detecting identical path names [modified] Pin
Mattias G11-Sep-09 2:07
Mattias G11-Sep-09 2:07 
GeneralRe: Detecting identical path names Pin
David Crow11-Sep-09 3:40
David Crow11-Sep-09 3:40 
GeneralRe: Detecting identical path names Pin
Randor 13-Sep-09 0:19
professional Randor 13-Sep-09 0:19 
GeneralRe: Detecting identical path names Pin
Member 419459314-Sep-09 9:21
Member 419459314-Sep-09 9:21 
GeneralRe: Detecting identical path names Pin
Mattias G14-Sep-09 22:53
Mattias G14-Sep-09 22:53 
Thanks for the input. Have been trying IShellItem::Compare, but can't get that to work unless files on the same share are specified the same way (\\share\path or X:\path). IShellItem::Compare can handle differences in case, however. I'm using SHCreateShellItem to create the objects, and that call fails if I'm using a relative path such as \\share\bohoo\tada\..\tada\file.txt. As always, this could be due to user incompetence on my side, so feel free to check this one for errors:

// ...
PIDLIST_ABSOLUTE pid1; 
PIDLIST_ABSOLUTE pid2; 
IShellItem* itm1;
IShellItem* itm2;

pid1 = ILCreateFromPath(szPath);
SHCreateShellItem(NULL, NULL, pid1, &itm1);
ILFree(pid1);

for(unsigned i = 0; i < m_rgGlossaries.size(); i++){
	BSTR strPath;
	// ...
	pid2 = ILCreateFromPath(strPath);
	SysFreeString(strPath);
	SHCreateShellItem(NULL, NULL, pid2, &itm2);
	ILFree(pid2);
	itm1->Compare(itm2, SICHINT_ALLFIELDS, &nCmpResult);
	itm2->Release();
	if(nCmpResult == 0){
		AfxMessageBox(_T("Hurrah"));
		// ...
	}
}

// ...


Eagerly awaiting suggestions. Would prefer not to do lots of conversions and resolving on my own.
GeneralRe: Detecting identical path names Pin
Member 419459315-Sep-09 9:31
Member 419459315-Sep-09 9:31 
GeneralRe: Detecting identical path names Pin
Randor 16-Sep-09 2:09
professional Randor 16-Sep-09 2:09 
GeneralRe: Detecting identical path names Pin
Member 419459316-Sep-09 5:48
Member 419459316-Sep-09 5:48 
QuestionIs There a way to set WS_EX_RTLREADING style only to some columns of ClistCtrl Pin
A&Ms11-Sep-09 0:34
A&Ms11-Sep-09 0:34 
Questionvisual studio WINAPI directive Pin
FotisSs11-Sep-09 0:15
FotisSs11-Sep-09 0:15 
AnswerRe: visual studio WINAPI directive Pin
CPallini11-Sep-09 0:51
mveCPallini11-Sep-09 0:51 
AnswerRe: visual studio WINAPI directive Pin
Stuart Dootson11-Sep-09 1:02
professionalStuart Dootson11-Sep-09 1:02 
QuestionHow to make image in a rich edit? Pin
mr bard210-Sep-09 23:42
mr bard210-Sep-09 23:42 
AnswerRe: How to make image in a rich edit? Pin
Mattias G11-Sep-09 1:01
Mattias G11-Sep-09 1:01 
GeneralRe: How to make image in a rich edit? Pin
mr bard211-Sep-09 23:39
mr bard211-Sep-09 23:39 
AnswerRe: How to make image in a rich edit? Pin
Nuri Ismail11-Sep-09 2:29
Nuri Ismail11-Sep-09 2:29 
GeneralRe: How to make image in a rich edit? Pin
mr bard211-Sep-09 23:44
mr bard211-Sep-09 23:44 
GeneralRe: How to make image in a rich edit? Pin
kilt14-Sep-09 2:24
kilt14-Sep-09 2:24 
QuestionHow to use printing tools on Visual C++ 6.0? [modified] Pin
Eka Candra10-Sep-09 23:16
Eka Candra10-Sep-09 23:16 
AnswerRe: How to use printing tools on Visual C++ 6.0? Pin
CPallini10-Sep-09 23:45
mveCPallini10-Sep-09 23:45 
GeneralRe: How to use printing tools on Visual C++ 6.0? Pin
Eka Candra11-Sep-09 19:40
Eka Candra11-Sep-09 19:40 
Questionsaving view size inside Splitter control Pin
rp_suman10-Sep-09 22:53
rp_suman10-Sep-09 22:53 

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.