Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Template: how to detect type Pin
Moak26-Apr-10 4:53
Moak26-Apr-10 4:53 
QuestionESTREAMIN carriage return Pin
ForNow24-Apr-10 21:52
ForNow24-Apr-10 21:52 
AnswerRe: ESTREAMIN carriage return Pin
Stuart Dootson25-Apr-10 1:31
professionalStuart Dootson25-Apr-10 1:31 
GeneralRe: ESTREAMIN carriage return Pin
ForNow25-Apr-10 2:17
ForNow25-Apr-10 2:17 
Questionhow to get the filepath which is selected? Pin
kobe893624-Apr-10 20:57
kobe893624-Apr-10 20:57 
AnswerRe: how to get the filepath which is selected? Pin
Code-o-mat24-Apr-10 22:16
Code-o-mat24-Apr-10 22:16 
GeneralRe: how to get the filepath which is selected? Pin
kobe893624-Apr-10 22:41
kobe893624-Apr-10 22:41 
GeneralRe: how to get the filepath which is selected? Pin
Code-o-mat24-Apr-10 23:05
Code-o-mat24-Apr-10 23:05 
I personally don't know any standard way to do what you want (which of course does not mean there isn't any).
You could try hooking into explorer.exe, subclass the list control that hosts the icons on the desktop, or the window that receives notifications from the list view, or installing a (system-wide?) message hook, to find out when and to what the selection changes. Then you could use SHGetDesktopFolder[^] and use IShellFolder::EnumObjects[^] to find the path for the selected item, if it has any. How you would find out which icon belongs to which shell objects is beyond me at this point, you could try finding that object by the name the icon shows but this is probably a bad idea (for example if i have a "myFile.pdf" and a "myFile.txt" sitting on my desktop, i think both will have the name "myFile", the extension is hidden, or at least can be). If you are lucky then the items' itemdata contains something that can be used to identify them, for example a pointer to a IDList or somesuch, then you could even skip the "look up" part thorough the enumeration. This whole thing is just an idea and not a simple one at that...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <

GeneralRe: how to get the filepath which is selected? Pin
kobe893624-Apr-10 23:47
kobe893624-Apr-10 23:47 
GeneralRe: how to get the filepath which is selected? Pin
Code-o-mat25-Apr-10 0:07
Code-o-mat25-Apr-10 0:07 
GeneralRe: how to get the filepath which is selected? Pin
kobe893625-Apr-10 1:07
kobe893625-Apr-10 1:07 
GeneralRe: how to get the filepath which is selected? Pin
Code-o-mat25-Apr-10 1:23
Code-o-mat25-Apr-10 1:23 
QuestionOpenGL help! Pin
epinez24-Apr-10 16:48
epinez24-Apr-10 16:48 
AnswerRe: OpenGL help! Pin
Tim Craig24-Apr-10 16:58
Tim Craig24-Apr-10 16:58 
GeneralRe: OpenGL help! Pin
epinez24-Apr-10 17:04
epinez24-Apr-10 17:04 
GeneralRe: OpenGL help! Pin
Tim Craig24-Apr-10 19:37
Tim Craig24-Apr-10 19:37 
GeneralRe: OpenGL help! Pin
Cedric Moonen25-Apr-10 1:15
Cedric Moonen25-Apr-10 1:15 
AnswerRe: OpenGL help! Pin
Saurabh.Garg24-Apr-10 17:50
Saurabh.Garg24-Apr-10 17:50 
QuestionOverloading operator== for custom class and NULL? Pin
yashachan24-Apr-10 12:59
yashachan24-Apr-10 12:59 
AnswerRe: Overloading operator== for custom class and NULL? Pin
Saurabh.Garg24-Apr-10 15:48
Saurabh.Garg24-Apr-10 15:48 
GeneralRe: Overloading operator== for custom class and NULL? Pin
yashachan25-Apr-10 1:56
yashachan25-Apr-10 1:56 
GeneralRe: Overloading operator== for custom class and NULL? Pin
Saurabh.Garg25-Apr-10 2:03
Saurabh.Garg25-Apr-10 2:03 
GeneralRe: Overloading operator== for custom class and NULL? Pin
Saurabh.Garg25-Apr-10 2:57
Saurabh.Garg25-Apr-10 2:57 
GeneralRe: Overloading operator== for custom class and NULL? Pin
yashachan25-Apr-10 5:16
yashachan25-Apr-10 5:16 
GeneralRe: Overloading operator== for custom class and NULL? Pin
Saurabh.Garg25-Apr-10 5:34
Saurabh.Garg25-Apr-10 5:34 

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.