ãã¬ãã¥ã¼ãã³ãã©ã¯ MSDN Magazine ã§æ±ããã¦ããããããã©ããµã ãã¤ã«ãããã¤ã*1ã¯æ å ±ãå°ãªãã®ã§ã¡ã¢ã
åæ¸ãã¦ãããããããªãã®ã§ããã³ãæè¿ã
å®è£ ã¡ã¢
åºæ¬çã«ã¯ IThumbnailProvider 㨠IInitializeWithStreamãIInitializeWithItemãIInitializeWithFile ã®ã©ãããå®è£ ããã°ããã
IThumbnailProvider
IThumbnailProvider 㯠GetThumbnail 1ã¤ã®ã¡ã½ããããæããªãã
HRESULT GetThumbnail(
UINT cx,
HBITMAP *phbmp,
WTS_ALPHATYPE *pdwAlpha
);
ã¨å¼æ°ãå®ç¾©ããã¦ãã¦ãããããã®å¼æ°ã®æå³ã¯
- cx : è¦æ±ããã¦ãããµã ãã¤ã«ã®ãµã¤ãºã
- phbmp : ä½æããããããããã®ãã³ãã«ãDIB ã® 32ããããããªãã¨ãã¡ã
- pdwAlpha : ãããããããã³ãã«ãã¢ã«ãã¡ãã£ã³ãã«ãå«ãã§ãããã©ããæå®ããã
- WTSAT_UNKNOWN : ã·ã§ã«ãèªåå¤å¥ããï¼
- WTSAT_RGB : ã¢ã«ãã¡ãã£ã³ãã«ãå«ã¾ãªãã
- WTSAT_ARGB : ã¢ã«ãã¡ãã£ã³ãã«ãå«ãã
System.Drawing.Bitmap ã® GetHbitmap ã§ä½æãããããããããã³ãã«ããã®ã¾ã¾ä½¿ãããã©ããã¯æªç¢ºèªã
IInitializeWithStream, IInitializeWithFile, IInitializeWithItem
IInitializeWithStream 㨠IInitializeWithFile ã«ã¤ãã¦ã¯
Microsoft Learn: Build skills that open doors in your career
ãè¦ãæ¹ãå§åçã«ããã®ã§çç¥ãInitialize ã¡ã½ãããå®è£ ããã°ããã ããããã
IInitializeWithItem 㯠Initialize ã¡ã½ããã®å¼æ°ã®åã IShellItem ã«ãªã£ãã ããã¡ãªã¿ã« IInitializeWithStream 㯠IStreamãIInitializeWithFile 㯠LPCWSTR ã«ãªã£ã¦ããã
IStream 㯠System.Runtime.InteropService.ComTypes ã«ããã¼ã¸åãæä¾ããã¦ããã®ã§ãIShellItem ãå¼æ°ã®ãã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯ä½¿ãã«ãããã
ãã® 3 種é¡ãã 1 ã¤ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®è£ ãã¦ãããªãã¨ãã©ã®ãã¡ã¤ã«ã®ãµã ãã¤ã«ãå¿ è¦ãªã®ãåãããªããªãã
*1:ã©ã¤ãã¢ã¤ã³ã³ã¨ãå¼ã°ãããã®