Click here to Skip to main content
15,912,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I check the exsistence of a Registry Key? Pin
J_E_D_I18-Feb-08 1:21
J_E_D_I18-Feb-08 1:21 
AnswerRe: How can I check the exsistence of a Registry Key? Pin
Rajkumar R18-Feb-08 1:26
Rajkumar R18-Feb-08 1:26 
GeneralRe: How can I check the exsistence of a Registry Key? Pin
J_E_D_I18-Feb-08 2:42
J_E_D_I18-Feb-08 2:42 
AnswerRe: How can I check the exsistence of a Registry Key? [modified] Pin
Rajkumar R18-Feb-08 2:54
Rajkumar R18-Feb-08 2:54 
GeneralRe: How can I check the exsistence of a Registry Key? Pin
J_E_D_I18-Feb-08 7:10
J_E_D_I18-Feb-08 7:10 
QuestionRe: How can I check the exsistence of a Registry Key? [modified] Pin
Rajkumar R18-Feb-08 7:38
Rajkumar R18-Feb-08 7:38 
GeneralRe: How can I check the exsistence of a Registry Value? Pin
J_E_D_I18-Feb-08 10:07
J_E_D_I18-Feb-08 10:07 
QuestionRe: How can I check the exsistence of a Registry Value? Pin
David Crow18-Feb-08 11:03
David Crow18-Feb-08 11:03 
GeneralRe: How can I check the exsistence of a Registry Key? Pin
J_E_D_I18-Feb-08 10:10
J_E_D_I18-Feb-08 10:10 
QuestionRe: How can I check the exsistence of a Registry Key? Pin
Rajkumar R18-Feb-08 19:29
Rajkumar R18-Feb-08 19:29 
GeneralRe: How can I check the exsistence of a Registry Key? Pin
J_E_D_I19-Feb-08 2:13
J_E_D_I19-Feb-08 2:13 
GeneralRe: How can I check the exsistence of a Registry Key? Pin
Rajkumar R19-Feb-08 2:41
Rajkumar R19-Feb-08 2:41 
GeneralRe: How can I check the exsistence of a Registry Key? Pin
David Crow18-Feb-08 8:25
David Crow18-Feb-08 8:25 
AnswerRe: How can I check the exsistence of a Registry Key? Pin
Hamid_RT18-Feb-08 7:05
Hamid_RT18-Feb-08 7:05 
QuestionHow do I generate a System::Drawing::Color array? Pin
Manfr3d18-Feb-08 1:05
Manfr3d18-Feb-08 1:05 
AnswerRe: How do I generate a System::Drawing::Color array? Pin
Iain Clarke, Warrior Programmer18-Feb-08 1:55
Iain Clarke, Warrior Programmer18-Feb-08 1:55 
AnswerRe: How do I generate a System::Drawing::Color array? Pin
ShilpiP18-Feb-08 2:24
ShilpiP18-Feb-08 2:24 
AnswerRe: How do I generate a System::Drawing::Color array? Pin
Hamid_RT18-Feb-08 7:09
Hamid_RT18-Feb-08 7:09 
GeneralFile Name Pin
john563217-Feb-08 23:53
john563217-Feb-08 23:53 
Hi Experts,

I am creating a Shell Context menu application. When I right click on any folder or file, I display the path of file/folder.

I used the following code to get the path of selected files/folders:
<br />
<br />
void CCoMenHandler::GetSelectedFiles(LPCITEMIDLIST pidlFolder,IDataObject *pdtobj)<br />
{<br />
	// get these paths into a CStringArray<br />
   g_szSelectedFiles.RemoveAll();<br />
	<br />
   // fetch all of the file names we're supposed to operate on<br />
   if (pdtobj) <br />
   {<br />
	   pdtobj->AddRef();<br />
<br />
	   STGMEDIUM medium;<br />
	   FORMATETC fe = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};<br />
<br />
	   HRESULT hr = pdtobj->GetData (&fe, &medium);<br />
	   if (FAILED (hr))<br />
	   {<br />
		   GetRecycleBinFiles();//I could not detect the name of RecycleBin Folder on right click<br />
		   return ;<br />
	   }<br />
<br />
	   // buffer to receive filenames<br />
	   char path[MAX_PATH];<br />
<br />
	  	 // how many are there?<br />
	   UINT fileCount = DragQueryFile((HDROP)medium.hGlobal, 0xFFFFFFFF,<br />
	   path, MAX_PATH);<br />
<br />
	   if (fileCount>0)<br />
	   {<br />
		   // avoid wasting mem when this thing gets filled in<br />
		   g_szSelectedFiles.SetSize(fileCount);<br />
<br />
		   // stash the paths in our CStringArray<br />
		   for (UINT i=0;i<fileCount;i++) <br />
         {<br />
			   // clear old path<br />
			   memset(path, 0, MAX_PATH);<br />
			   // fetch new path<br />
			   if (DragQueryFile((HDROP)medium.lpszFileName, i, path, MAX_PATH)) <br />
            {<br />
 		         g_szSelectedFiles.SetAt(i, path);<br />
				//AfxMessageBox(path);<br />
		      }<br />
	      }<br />
<br />
         g_szSelectedFiles.FreeExtra();<br />
      }<br />
<br />
      // free our path memory - we have the info in our CStringArray<br />
      ReleaseStgMedium(&medium);<br />
   }<br />
}<br />
<br />



But If I click on file shortcut(.lnk) file it displat the target path of file, although .lnk itself also a file.

I want to retrive shortcut (.lnk) file path.
GeneralNeed Help on Internet Programing Pin
manish.patel17-Feb-08 22:54
manish.patel17-Feb-08 22:54 
GeneralRe: Need Help on Internet Programing Pin
Amar Sutar18-Feb-08 1:06
Amar Sutar18-Feb-08 1:06 
GeneralNeed help for converting to Unicode Pin
Nandu_77b17-Feb-08 22:15
Nandu_77b17-Feb-08 22:15 
GeneralRe: Need help for converting to Unicode Pin
Rajesh R Subramanian17-Feb-08 22:39
professionalRajesh R Subramanian17-Feb-08 22:39 
GeneralRe: Need help for converting to Unicode Pin
Nandu_77b18-Feb-08 0:33
Nandu_77b18-Feb-08 0:33 
GeneralRe: Need help for converting to Unicode Pin
Rajesh R Subramanian18-Feb-08 0:49
professionalRajesh R Subramanian18-Feb-08 0:49 

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.