|
Hi Experts,
I am creting a shell context menu and display the file path selected with right click.
As soon as I click on .lnk file(shortcut) it display the Target file path.
I am using DragQueryFile() to obtain the file path.
What is wromg with it?
|
|
|
|
|
pther wrote: What is wromg with it?
could your code!, might be it help us to understand the problem!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
<br />
void CCoMenHandler::GetSelectedFiles(LPCITEMIDLIST pidlFolder,IDataObject *pdtobj)<br />
{<br />
<br />
g_szSelectedFiles.RemoveAll();<br />
<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 />
<br />
<br />
if (FAILED (hr))<br />
{<br />
return ;<br />
}<br />
<br />
char path[MAX_PATH];<br />
<br />
UINT fileCount = DragQueryFile((HDROP)medium.lpszFileName, 0xFFFFFFFF,path, MAX_PATH);<br />
<br />
<br />
<br />
if (fileCount>0)<br />
{<br />
g_szSelectedFiles.SetSize(fileCount);<br />
<br />
for (UINT i=0;i<fileCount;i++) <br />
{<br />
memset(path, 0, MAX_PATH);<br />
if (DragQueryFile((HDROP)medium.lpszFileName, i, path, MAX_PATH)) <br />
{<br />
g_szSelectedFiles.SetAt(i, path);<br />
}<br />
<br />
}<br />
<br />
g_szSelectedFiles.FreeExtra();<br />
}<br />
<br />
ReleaseStgMedium(&medium);<br />
}<br />
}<br />
<br />
<br />
|
|
|
|
|
You registered the handler under "*" or under "lnk" in the registry?
|
|
|
|
|
Didn't I reply to this indentical question from an identical person last week? And did you follow up my long reply...?
This is at least the fourth time I've seen you post the question.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Having a sense of déjà vu, Iain?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have placed Cbuttons on CView
the problem is
when i click on a button i am setting its state to true so i am able to retain that blue color vista effect for the selected button
but when click on another button the previously selceted button will get unselected and the blue color vista effect will go but it wont go completely
little bit vista effect still be there on button which was previously selected with mouse ( selected means Clicked)...i am working on vista OS
but i dont wanna have that previously visited button color
what shud i do for that
please help me sorting out the issue
|
|
|
|
|
hi all,
i am savitri,i am from india,i am used the function like the below but it showing error. please some one help me to debug that error please.
SN = A_BUGFIX(ResultSN[ctr])+SN;
this is error:
error C2666: '+' : 4 overloads have similar conversions
thanku all,
savitri.
|
|
|
|
|
Hi Savitri,
savitri wrote: i am from india
I could only wish you were not.
You just posted a question, which can be an example for "How not to post a query in the forum". Please read How to get an answer to your questions[^] before you post further doubts. Also see if it would be plausible for you to buy a very basic C++ book.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Now we have "li zhiyuan" and "savitri". They two can form a band.
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: They two can form a band.
what type of band, drummer band or programmer band!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
ThatsAlok wrote: what type of band, drummer band or programmer band!
A beginner level C++ book-buying band.
Maxwell Chen
|
|
|
|
|
May be it is possible to get group discount.
|
|
|
|
|
on books
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Rajesh R Subramanian wrote: savitri wrote:
i am from india
I could only wish you were not.
sometime it happen, a famouse quote from Hindi Flim, "in big cities, small thing generally happens"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
ThatsAlok wrote: sometime it happen, a famouse quote from Hindi Flim, "in big cities, small thing generally happens"
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
you working some where or you are in college!. actually before replying to your answer we must know what type of variable SN is, what A_BUGFIX function do ?
thanks!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
hi all,
i am studying,, why u all are inserting too much.. all are take some time to learn new things ok. u all also from scratch only become expert in subjects ok. dont insert to freshers ok.
thanku,
savitri.
|
|
|
|
|
savitri wrote: scratch
Scratch what?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
savitri wrote: i am studying,, why u all are inserting too much.. all are take some time to learn new things ok. u all also from scratch only become expert in subjects ok. dont insert to freshers ok.
I read books which teach C++ syntax when I was learning C++ from scratch ten years ago!
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: I read books which teach C++ syntax when I was learning C++ from scratch ten years ago!
I also have a book about c++, but I think it is broken, because the ctrl-f function doesn't work.
I first thought it the battery was empty, but I can't seem to find where I should put new batteries.
codito ergo sum
|
|
|
|
|
BadKarma wrote: I also have a book about c++, but I think it is broken, because the ctrl-f function doesn't work.
I first thought it the battery was empty, but I can't seem to find where I should put new batteries.
It's very easy: Don't waste the effort to put new batteries. Buy a new book instead!
(But why does a C++ book need batteries?! )
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: (But why does a C++ book need batteries?! )
to help you to find code , this book is equiped with AI, which read your mind and find the suitable answer!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
yes, you are correct, may be he meant his "broken" noteBOOK (PC).
|
|
|
|
|
Notebook.. wow! i am still using desktop
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
"If it were machines, the pair_programming seem to work, but for humans it is pair_crackdown that seems to work! " - Nisamudheen
Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|