windows api help

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2006
Posts: 2
Reputation: nsvanjani is an unknown quantity at this point 
Solved Threads: 0
nsvanjani nsvanjani is offline Offline
Newbie Poster

windows api help

 
0
  #1
Mar 16th, 2009
hello programmers
is there any win32 api or technique by which we can fetch the address of the active window of explorer(not the internet explorer)

please help
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 139
Reputation: MrSpigot is on a distinguished road 
Solved Threads: 33
MrSpigot's Avatar
MrSpigot MrSpigot is offline Offline
Junior Poster

Re: windows api help

 
1
  #2
Mar 16th, 2009
Check out FindWindow(). You'll need the Explorer class name, which is "ExploreWClass".
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 2
Reputation: nsvanjani is an unknown quantity at this point 
Solved Threads: 0
nsvanjani nsvanjani is offline Offline
Newbie Poster

Re: windows api help

 
0
  #3
Mar 17th, 2009
god but will it give me the address of files on the desktop
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 139
Reputation: MrSpigot is on a distinguished road 
Solved Threads: 33
MrSpigot's Avatar
MrSpigot MrSpigot is offline Offline
Junior Poster

Re: windows api help

 
0
  #4
Mar 17th, 2009
Originally Posted by nsvanjani View Post
god but will it give me the address of files on the desktop
Well no.... it will give you the address of an active File Explorer window as requested.
If you just want to get to files on the desktop you can just look at the contents of C:\WINDOWS\DESKTOP, or better still, as Windows may be installed elsewhere, use the DESKTOP subdir of GetWindowsDirectory().
Or better still use:
  1. LPITEMIDLIST pidl;
  2. SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl);
  3. // Convert the item ID list's binary
  4. // representation into a file system path
  5. char szPath[_MAX_PATH];
  6. SHGetPathFromIDList(pidl, szPath);
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC