使用DrawDibDraw函数来打印位图,有两个参数LPBITMAPINFOHEADER lpbi和 LPVOID lpBits, 不知如何获得,请问通过位图的ID号如何获得这两个参数的信息;
BOOL DrawDibDraw(
  HDRAWDIB hdd,             
  HDC hdc,                  
  int xDst,                 
  int yDst,                 
  int dxDst,                
  int dyDst,                
  LPBITMAPINFOHEADER lpbi,  
  LPVOID lpBits,            
  int xSrc,                 
  int ySrc,                 
  int dxSrc,                
  int dySrc,                
  UINT wFlags               
);

解决方案 »

  1.   

    lpbi 包含图象格式的BITMAPINFOHEADER结构的地址。DIB的颜色表紧跟着格式后,并且biHeight成员必须为正值;DrawDibDraw不能绘制倒置的DIB。lpbits 包含位图位的缓冲的地址。
      

  2.   

    http://www.ittide.com/document/article/graphic/21.html
      

  3.   

    请高手告诉我如何通过位图的ID来获得位图的BITMAPINFOHEADER结构的地址
      

  4.   

    int StretchDIBits(
      HDC hdc,                      // handle to DC
      int XDest,                    // x-coord of destination upper-left corner
      int YDest,                    // y-coord of destination upper-left corner
      int nDestWidth,               // width of destination rectangle
      int nDestHeight,              // height of destination rectangle
      int XSrc,                     // x-coord of source upper-left corner
      int YSrc,                     // y-coord of source upper-left corner
      int nSrcWidth,                // width of source rectangle
      int nSrcHeight,               // height of source rectangle
      CONST VOID *lpBits,           // bitmap bits
      CONST BITMAPINFO *lpBitsInfo, // bitmap data
      UINT iUsage,                  // usage options
      DWORD dwRop                   // raster operation code
    )
    请分析如何通过位图的ID来获得这两个参数lpBits,lpBitsInfo的值