Prev: Bug im mktime() / _mktime64() ?
Next: CAppModule issues
From: Ansh on 4 Dec 2006 10:08 Hi All, I subclassed ProgMan->SHELLDLL_DefView->SysListView32. I want to check the list view item details when LVM_INSETITEM message is sent. But as i noticed in my subclassed WinProc inside case LVM_INSETITEM only the lParam value is changed and all the things remain same. I know that this lParam is pointer to some location but i unable to find that which kind of structure does it points. I think that structure is not LVITEM type since when i take lParam value in pointer to LVITEM it's pszText pointer is NULL. I want to know the details of inserted item specifically it Strings which will tell me that which file or folder it is of desktop. Can anyone have any idea how it can be done. Or can anyone tell which type of structure does this lParam value points. Thnx in advance. Ansh
From: Gary Chanson on 4 Dec 2006 10:50 "Ansh" <shalabhawasthi(a)gmail.com> wrote in message news:1165244925.433286.14150(a)16g2000cwy.googlegroups.com... > Hi All, > I subclassed ProgMan->SHELLDLL_DefView->SysListView32. I want to check > the list view item details when LVM_INSETITEM message is sent. But as i > noticed in my subclassed WinProc inside case LVM_INSETITEM only the > lParam value is changed and all the things remain same. I know that > this lParam is pointer to some location but i unable to find that which > kind of structure does it points. I think that structure is not LVITEM > type since when i take lParam value in pointer to LVITEM it's pszText > pointer is NULL. I want to know the details of inserted item > specifically it Strings which will tell me that which file or folder it > is of desktop. Can anyone have any idea how it can be done. Or can > anyone tell which type of structure does this lParam value points. The lParam of LVM_INSERTITEM has to point to an LVITEM structure. Of course, that structure will be in the address space of Explorer so you have to reference it within the address space of that process. Look at the mask member of that structure to see which other members of the structure contain useful information. My guess is you will find that it is not setting the LVIF_TEXT flag. You're probably dealing with an owner drawn item and this may make your method unusable. -- - Gary Chanson (Windows SDK MVP) - Abolish Public Schools
From: Ansh on 5 Dec 2006 06:19 Thnx Gary.....But When i check the value of mask then it is 519 (in decimal) which i think is the combination of Mask HEX Dec. LVIF_TEXT 0x0001 1 LVIF_IMAGE 0x0002 2 LVIF_PARAM 0x0004 4 LVIF_COLUMNS 0x0200 512 In my subclassed Window Procedure: In case LVM_INSERTITEM: I put traces which shown me values as follows: LPLVITEM plvitem = (LPLVITEM)lParam; For 1st time: ------------------------------------------- plvitem->mask=519 (in Dec.), 207 (in Hex.), plvitem->iItem=2147483647, plvitem->iSubItem=0, plvitem->state=0, plvitem->stateMask=0, plvitem->cchTextMax=0, plvitem->iImage=-1, plvitem->lParam=1501128 For 2nd time: --------------------------------------------- plvitem->mask=519 (in Dec.), 207 (in Hex.), plvitem->iItem=2147483647, plvitem->iSubItem=0, plvitem->state=0, plvitem->stateMask=0, plvitem->cchTextMax=0, plvitem->iImage=-1, plvitem->lParam=1494696 Here we can see that only value of lParam is changing. But when i take the value of lParam into a pointer to a structure LVITEM and check its value using quick watch then it shows that pszText is NULL. But when i looked at memory i get from pMem where LPLVITEM pMem = (LPLVITEM)plvitem->lParam then it takes me to location where i can see shortcut strings. But i dont know how can i extract them. Hope now u can understand what exactly the prob i have. I want to know the name (String ) of listview item each time i get LVM_INSERTITEM message in my subclassed WinProc so that i can know desktop shortcut has been added to the ListView. Thanks, Ansh
From: Christian ASTOR on 5 Dec 2006 09:40 Ansh a écrit : > I subclassed ProgMan->SHELLDLL_DefView->SysListView32. I want to check > the list view item details when LVM_INSETITEM message is sent. WH_GETMESSAGE (DLL), "SHELLDLL_DefView" subclassing, LVN_INSERTITEM, ListView_GetItemText()
From: Ansh on 7 Dec 2006 02:16
Thnx Christian, But if u can be a bit more descriptive then i think i would understand better. Thanks, Ansh |