HBITMAP与BITMAP 的区别

HBITMAP   是句柄;  
BITMAP    是实例:  
  typedef   struct   tagBITMAP  

{     
        LONG       bmType;    
        LONG       bmWidth;    
        LONG       bmHeight;    
        LONG       bmWidthBytes;    
        WORD       bmPlanes;    
        WORD       bmBitsPixel;    
        LPVOID   bmBits;    
  }   BITMAP;     

windows不允许直接对用户对象操作,其操作得通过句柄来进行。  

例如:
  HBITMAP   hBmp;  
  BITMAP   bm;  
  GetObject(hBmp,sizeof(bm),&bm);  

通过HBITMAP取得BITMAP;

posted @ 2015-01-06 15:01  风无心客  阅读(482)  评论(0编辑  收藏  举报