|
david bagaturia wrote: this code generate, errors
Which errors ?
You need to give much more information when you ask a question, it is not the first time that people need to ask you for more information about your problem. If you want an answer, then you should describe your problem in more details.
|
|
|
|
|
david bagaturia wrote: this code generate, errors...
Are they small, medium, or large errors?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I prefer "big".
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Where's error? error to connect or error on c++
|
|
|
|
|
Sorry abut detail's.
I write this simpel code, but I have Error message wen I Build it.
I cant see my errors, can help?
|
|
|
|
|
david bagaturia wrote: ...but I have Error message wen I Build it.
Such as?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Again its difficult to guess you said "when you Build it" I cant say anything need to more info.
|
|
|
|
|
I am seeing an unusual behavior with a CListCtrl API on a CFileDialog, only
on VISTA. I have a call like GetItemData on the list control which is
supposed to return the item as a LPCITEMIDLIST but it always returns NULL
only on a VISTA OS. Windows XP is fine.
Can anyone help me on this one?
|
|
|
|
|
BeliefInMe wrote: Can anyone help me on this one?
Without a snippet showing the offending code?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Code's here
LPNMLISTVIEW phdr = NULL;
phdr = reinterpret_cast<LPNMLISTVIEW>(lParam);
CListCtrl lc;
lc.Attach(phdr->hdr.hwndFrom);
LPCITEMIDLIST pidl = (LPCITEMIDLIST) lc.GetItemData(phdr->iItem);
SHGetPathFromIDList(pidl, str);
pidl is NULL. Hence i am not able to get File Path.
if i use GetItemText, i will get only file name without extension.
Any Solution. Or any other way to follow..
This works in XP but not in Vista.
|
|
|
|
|
This is in response to what (notification) message? Are you using a hook with CFileDialog ? Do you have file extensions (in Windows Explorer) turned off?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes, you are right..
I am using Hook and OnNotify.
|
|
|
|
|
BeliefInMe wrote: I am using...OnNotify.
Which LVN_xxx notification?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
At the point pidl is NULL , what is the value of phdr->iItem ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
phdr->iItem is showing corect value... The value depends upon which image i select.
|
|
|
|
|
BeliefInMe wrote: phdr->iItem is showing corect value...
Is it ever -1 ?
Are you verifying that phdr->hdr.code is equal to LVN_ITEMCHANGED ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ya its like
if (pLVHdr->hdr.code == LVN_ITEMCHANGED && (pLVHdr->uChanged & LVIF_STATE))
and iItem is never -1
|
|
|
|
|
Instead of LPNMLISTVIEW, i used LPLVITEM.
LPLVITEM lv = = reinterpret_cast<LPLVITEM>(lParam);
lv.lParam is also zero.
|
|
|
|
|
BeliefInMe wrote: Instead of LPNMLISTVIEW, i used LPLVITEM.
LPLVITEM lv = = reinterpret_cast<lplvitem>(lParam);
lv.lParam is also zero.
So have you tried casting to a LPNMLISTVIEW instead?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: So have you tried casting to a LPNMLISTVIEW instead?
I have casted to LPLVITEM.
I think it cannot convert from 'LPNMLISTVIEW' to 'LPLVITEMW'.
|
|
|
|
|
BeliefInMe wrote: I think it cannot convert from 'LPNMLISTVIEW' to 'LPLVITEMW'.
Why would you think this would work? They are two different structures. Use LPNMLISTVIEW like the documentation states.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am afraid, i am confusing you.. I said instead of
LPNMLISTVIEW pLVHdr = reinterpret_cast<LPNMLISTVIEW>(lParam);
i used
LPLVITEM pLVHdr = reinterpret_cast<LPLVITEM>(lParam);
|
|
|
|
|
But why, since LPNMLISTVIEW and LPLVITEM are two different structures. The documentaton plainly states that the lparam that accompanies the LVN_ITEMCHANGED notificaton is a pointer to a NMLISTVIEW structure, not a pointer to a LVITEM as you are trying to use.
That said, I do not know why your code "works" on Windows XP but not on Vista. I do not have the latter to test on.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I think, i am disturbing you.
Anyways Thank you very much for your time and help.
|
|
|
|