ListView - Handling I_IMAGECALLBACK
Raja Segar -- rsz@tm.net.my
Sunday, November 10, 1996
Environment : VC++4.2b Patched, Win95
I can't seem to find any info on how to handle I_IMAGECALLBACK for
the CListCtrl. I know how to handle LPSTR_TEXTCALLBACK though.
Can anyone out there please tell me the way to me on how to handle
both of them in the message handler below.
Here is my current code to handle LPSTR_TEXTCALLBACK.
void CListCtrlBox::OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult)
{
LV_DISPINFO* pLvdi = (LV_DISPINFO*)pNMHDR;
FILEITEM *pFile = (FILEITEM *)(pLvdi->item.lParam);
switch(pLvdi->hdr.code)
{
case LVN_GETDISPINFO:
switch (pLvdi->item.iSubItem)
{
case 0: // FileName
pLvdi->item.pszText = pFile->FileName;
break;
case 1: // Directory
pLvdi->item.pszText = (LPSTR)LPCSTR pDirArray->
GetAt(pFile->Directory));
break;
case 2: // FileSize
FormatStr(pFile->FileSize, szText);
pLvdi->item.pszText = szText;
break;
default:
break;
}
default:
break;
}
*pResult = 0;
}
How do i feed in the info for I_IMAGECALLBACK.
Please help if possible.
Thanks in advance.
( _ \/ __)(_ )
) /\__ \ / /_
(_)\_)(___/(____)@pc.jaring.my
Edith Russo -- edith@accessone.com
Monday, November 11, 1996
Here's what I do:
void CAssociationListCtrl::OnGetdispinfo(NMHDR* pNMHDR, LRESULT* result)
{
...
switch (pDispInfo->item.iSubItem)
{
case 0: // Association Desc
...
pDispInfo->item.iImage = ;
break;
----------
From: Raja Segar[SMTP:rsz@tm.net.my]
Sent: Sunday, November 10, 1996 4:40 AM
To: mfc-l@netcom.com
Subject: ListView - Handling I_IMAGECALLBACK
Environment : VC++4.2b Patched, Win95
I can't seem to find any info on how to handle I_IMAGECALLBACK for
the CListCtrl. I know how to handle LPSTR_TEXTCALLBACK though.
Can anyone out there please tell me the way to me on how to handle
both of them in the message handler below.
Here is my current code to handle LPSTR_TEXTCALLBACK.
void CListCtrlBox::OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult)
{
LV_DISPINFO* pLvdi = (LV_DISPINFO*)pNMHDR;
FILEITEM *pFile = (FILEITEM *)(pLvdi->item.lParam);
switch(pLvdi->hdr.code)
{
case LVN_GETDISPINFO:
switch (pLvdi->item.iSubItem)
{
case 0: // FileName
pLvdi->item.pszText = pFile->FileName;
break;
case 1: // Directory
pLvdi->item.pszText = (LPSTR)LPCSTR pDirArray->
GetAt(pFile->Directory));
break;
case 2: // FileSize
FormatStr(pFile->FileSize, szText);
pLvdi->item.pszText = szText;
break;
default:
break;
}
default:
break;
}
*pResult = 0;
}
How do i feed in the info for I_IMAGECALLBACK.
Please help if possible.
Thanks in advance.
( _ \/ __)(_ )
) /\__ \ / /_
(_)\_)(___/(____)@pc.jaring.my
begin 600 WINMAIL.DAT
M>)\^(BH.`0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$-@ 0`
M`@````(``@`!!) &``P!```!````# ````,``# #````"P`/#@`````"`?\/
M`0```#\`````````@2L?I+ZC$!F=;@#=`0]4`@````!M9F,M;$!N971C;VTN
M8V]M`%--5% `;69C+6Q ;F5T8V]M+F-O;0``'@`", $````%````4TU44 ``
M```>``,P`0```!$```!M9F,M;$!N971C;VTN8V]M``````,`%0P!`````P#^
M#P8````>``$P`0```!,````G;69C+6Q ;F5T8V]M+F-O;2<```(!"S !````
M%@```%--5% Z349#+4Q 3D540T]-+D-/30````,``#D`````"P! .@$````"
M`?8/`0````0````````#/RP!"( '`!@```!)4$TN36EC`' ``0```"@```!213H@
M3&ES=%9I97<@+2!(86YD;&EN9R!)7TE-04=%0T%,3$)!0TL``@%Q``$````6
M`````;O/X*8\=RK,3CN/$="X[@`@KS1."@``'@`># $````%````4TU44 ``
M```>`!\,`0```!0```!E9&ET:$!A8V-E``@0`0```&4```!(15)%4U=(051)1$\Z5D])1$-!4U-/0TE!5$E/
M3DQ)4U1#5%),.CI/3D=%5$1)4U!)3D9/*$Y-2$12*E!.34A$4BQ,4D5354Q4
M*E)%4U5,5"E35TE40T@H4$1)4U!)3D9/+4E4``````(!"1 !````%@4``!(%
M``##"@``3%I&=3!+,(__``H!#P(5`J@%ZP*#`% "\@D"`&-H"L!S970R-P8`
M!L,"@S(#Q0(`<')"<1'B?Y=,=\R[09@`C T'S4K)/ 0;F1A>2! 3F]V-1/@8@20(!DP
M($ Q.6 Y-B T.B\P%+!-NS??,NU4&^ Z+S4Z;1%@^"UL0#=A!: DP$*1/@][
M..XE`&HP\4 O-2L=\E;;") 'X"T:X !P9"YP&1"!&Z!?24U!1T4=,,!,3$)!
M0TLM/RY#'#,V+[<:13"V16YV6FD#8&X'@ (P(";05D!#*RLT+C(BT% O&X 1
M< F ($!7"X Y-><<#!NP)G!N)P5 $; 3X+ @=&\@+N \$" `<)1Y(!\B("?Q
M:&\'X/]0@1& 2"$FH$B=4* %L J%+G1.,!T@'?8N&Z%K;@-1T5',3%!35%)?
M<%1%6%13%U1 "&!G^F@H]D,#D5$!`B FH A@?P5 5$$6$!_04G F@A/0;/<#
M( > 5#-W/#!0!Y_'X\@
ME' .4B$/"I0FXDQ67T2 25-024Y&3VT@FX,5O>G W`%1E> 5 *S#_;B-XL'S6*^9]RBQO>Q\\
M\-\FUR/P%A Q``6P>70+ =$-]=]5%#4Z%(
MCBCV4%GT3C!,;'!1,%V <&\$$&G5`F!E*/944C%K!"!=\>AA9'8`<&.KQW"]
M:88J*";@7P,P7"= 7U__;U"O@";@1K7])OTK/2]D+"H45,0"Y( ```P`0
M$ `````#`!$0`````$ `!S"@@OHSX,^[`4 `"#"@@OHSX,^[`1X`/0`!````
.!0```%)%.B `````""0`
`
end
| Вернуться в корень Архива
|