Click to open or copy the files for the ShowDIB sample.
The ShowDib sample illustrates how to deal with Device Independent Bitmaps (DIBs), and implement proper palette management.
This sample uses the following keywords:
_lclose; _llseek; _lread; _lwrite; abortdoc; addext; alignulong; animatepalette; appabout; apppaint; beginpaint; bitblt; bitmapfromdib; bound; charnext; charprev; charupper; checkdlgbutton; checkmenuitem; closeclipboard; copypalette; createbipalette; createbitmap; createcompatibledc; createdibitmap; createdibpalette; createpalette; createwindow; deletedc; deleteobject; destroywindow; dibfrombitmap; dibinfo; dibnumcolors; dlgcheckokenable; dlgdirselectex; dlgfnopen; drawselect; enablemenuitem; enablewindow; enddoc; endpage; endpaint; endwait; errmsg; escape; fid; filllistbox; fillrect; freedib; freeprocinstance; fsearchspec; get_em_setsel_mps; get_wm_activate_state; get_wm_command_cmd; get_wm_hscroll_code; get_wm_hscroll_pos; get_wm_vscroll_code; get_wm_vscroll_pos; getclientrect; getclipboarddata; getcurrentdirectory; getdc; getdevicecaps; getdibits; getdlgitem; getmenu; getobject; getpaletteentries; getprinterdc; getprinterdc1; getprofilestring; getscrollpos; getstockobject; gettextextentpoint; getwindowrect; getwindowtext; globalalloc; globalfree; globallock; globalrealloc; globalunlock; idf; initdib; initprinting; invalidaterect; isclipboardformatavailable; isdbcsleadbyte; isdialogmessage; isdib; isrectempty; killtimer; loadcursor; loadicon; loadstring; localalloc; localfree; lread; lstrcpy; lstrlen; lwrite; makeintresource; makelong; makempoint; memset; menucommand; messagebeep; messagebox; min; normalizerect; openclipboard; opendib; openfile; palettesize; patblt; peekmessage; postmessage; postquitmessage; printdib; printdlg; readbitmapfileheaderandconverttodwordalign; readdibbitmapinfo; realizedibformat; realizepalette; releasecapture; releasedc; renderformat; selectobject; selectpalette; sendmessage; setabortproc; setcapture; setclipboarddata; setcursor; setdlgitemtext; setpaletteentries; setrectempty; setscrollranges; settimer; setwindoworgex; sizewindow; sprintf; startdoc; startpage; startwait; strcpy; swap; termprinting; unreferenced_parameter; va_start; waitmessage; widthbytes; winmain; writedib; writemapfileheaderandconvertfromdwordaligntopacked; writeprofilestring