Window SubClassing另类运用(之二)[13]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 weizhisheng 的 blog

              shgetspecialfolderlocation(awnd, csidl, pidl);


              str := getnamefrompidl(pidl);


              getsmalliconfrompidl(pidl, himl, iimage);


              imagelist_draw(himl, iimage, pdis^.hdc, pdis^.rcitem.left+2, pdis^.rcitem.top+2, ild_transparent);


              inc(pdis^.rcitem.left, 20);


              drawtext(pdis^.hdc, pchar(str), -1, pdis^.rcitem, dt_singleline or dt_left or dt_vcenter);


              cotaskmemfree(pidl);


           end


           else begin // normal path


              setlength(str, max_path);


              sendmessage(hcombo, cb_getlbtext, pdis^.itemid, longint(pchar(str)));


              str := pchar(str);


              getsmalliconfrompath(str, himl, iimage);


              imagelist_draw(himl, iimage, pdis^.hdc, pdis^.rcitem.left+2, pdis^.rcitem.top+2, ild_transparent);


              inc(pdis^.rcitem.left, 20);


              drawtext(pdis^.hdc, pchar(str), -1, pdis^.rcitem, dt_singleline or dt_left or dt_vcenter);


           end;


        end;


end;


 


本文关键:Delphi,API,Subclass
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top