#define WINRGB_DIB  1
#define WINRLE4_DIB 2
#define WINRLE8_DIB 3
#define PM_DIB  10

typedef HGLOBAL HDIB;
typedef unsigned char huge* LPDIB;

#define RECTWIDTH(lpRect)  ((lpRect)->right - (lpRect)->left)
#define RECTHEIGHT(lpRect) ((lpRect)->bottom - (lpRect)->top)

HFILE DIBSelectFile(void);
HDIB  DIBReadFile(HFILE hfDIBFile, DWORD *dwFileSize);
BOOL  DIBInfo(HDIB hDib, DWORD dwFileSize);
int   DIBType(HDIB hDib);
WORD  DIBNumColors(LPDIB lpDib);
WORD  DIBHeight(LPDIB lpDib);
WORD  DIBWidth(LPDIB lpDib);
HPALETTE DIBCreatePalette(HDIB hDIB);
BOOL  DIBPaint(HDC hDC, int x, int y, HDIB hDIB);

