ICMView: ICM-Capable Image Viewer Sample

Click to open or copy the files for the ICMView sample.

It is recommended that you download from the parent level (ICM20), to get the general ICM Readme file.

This sample is an ICM-capable image viewer. This application uses ICM both inside and outside the DC ICM functions to manipulate the display and printing of Windows BMP and DIB format images. Typically, an application would just use one or the other; the preferred and encouraged method is outside the DC.

To run the application, type "ICMVIEW".  Choose Open from the File menu to open images, then use the secondary mouse button to bring up the properties of the selected image.

ICMView includes the following files:

File Purpose
Appinit.c Initialization
Cderr.h Error handling
Child.c Child windows
Debug.c Debug routines
Dialogs.c Dialog boxes
Dibinfo.c DIB information
Dibs.c DIB handling
Icmview.c Entry point
Print.c Printing routines
Regutil.c Registry utilities

The ICMView sample requires the BITMAPV5HEADER structure, to compile.  This structure should be defined in the Wingdi.h file used in the compilation process.  If this structure is not defined, you will need to obtain an updated version of the Win32 or Windows Platform SDK.

Building SDK Samples

This sample uses the following keywords:

_assert; _stprintf; _tcschr; _tcscmp; _tcscpy; _tcslen; _tsplitpath; abortdoc; abs; addrecentfile; applycolorsettings; assert; bitcount; bitmapbluemask; bitmapclrimportant; bitmapclrused; bitmapcompression; bitmapcstype; bitmapgreenmask; bitmapheight; bitmapimagesize; bitmapintent; bitmapredmask; bitmapsize; bitmapwidth; centerwindow; check_dwflag; checkdlgbutton; checkmenuitem; checkradiobutton; childwndpaint; childwndproc; clear_dwflag; clienttoscreen; closecolorprofile; closehandle; colormatchtotarget; colormatchui; colorsetupapply; commdlgextendederror; convertintent; copydibinfo; copyrect; copystring; createcolortransform; createdc; createdialog; createdialogparam; createdibinfo; createdibpalette; createdibpropsheet; createfile; createfilea; createfont; createglobaldibinfo; createnewimagewindow; createwindowex; debugbreak; debugmsg; defframeproc; defmdichildproc; deletecolortransform; deletedc; deletefile; destroymenu; destroywindow; dialogbox; dibheight; dispatchmessage; display_lasterror; dlgdibinfopaint; dlgdibpropsheet; dlgseticmoptionsfordevice; documentproperties; dumpbitmapfileheader; dumpbmpheader; dumpcolormatchsetup; dumpdibinfo; dumplogcolorspace; dumpmemory; dumpprofile; dumprectangle; enable_dwflag; enablemenuitem; enablewindow; end_wait_cursor; enddialog; enddoc; endpage; enumicmprofilecallback; enumprinter; enumprinters; errmsg; fduplicatedibinfo; fduplicateicminfo; ffreedibinfo; files; findcolortable; finddibbits; fopennewimage; formatlasterror; formatmessage; freaddibinfo; freememory; getbasefilename; getclientrect; getcolordirectory; getcolorprofilefromhandle; getcolorspacefrombitmap; getcurrentmdiwnd; getdc; getdefaulticminfo; getdefaulticmprofile; getdefaultprinterdc; getdefaultprinterdevmode; getdefaultprintername; getdevicecaps; getdibhandlefromdibinfo; getdibinfohandle; getdibinfoptr; getdlgitem; getdlgitemstring; getdlgitemtext; getfileversioninfo; getfileversioninfosize; geticmprofile; getlasterror; getmemory; getmenu; getmenuitemcount; getmenuiteminfo; getmessage; getobject; getopenfilename; getopenimagename; getparent; getprinterdc; getprofiledata; getprofilesavename; getprofilestring; getprop; getregistrystring; getsavefilename; getsavefilenamea; getscrollinfo; getscrollpos; getsettings; getstandardcolorspaceprofile; getsubmenu; getsystemmetrics; gettempfilename; gettemppath; gettickcount; getversion; getwindowlong; getwindowplacement; globalalloc; globalflags; globalfree; globalhandle; globallock; globalrealloc; globalsize; globalunlock; images; initapplication; initcommoncontrols; initdibinfo; initializescrollbars; initimagemenu; initinstance; initprinting; insertmenuitem; invalidaterect; is_bitmapcoreheader; is_bitmapinfoheader; is_bitmapv4header; is_bitmapv5header; is_win30_dib; iscolorprofilevalid; isdialogmessage; isdib; isdlgbuttonchecked; iswindow; iszoomed; labs; ldexp; loadaccelerators; loadcursor; loadicon; loadmenu; loadstring; lstrcat; lstrcmpi; lstrcpy; lstrcpyn; lstrlen; makeintresource; makelangid; makelong; memcpy; memset; messagebeep; messagebox; numcolorsindib; opencolorprofile; opencolorprofilefromfile; outputdebugstring; outputdebugstringa; palettesize; populateprintercombobox; postmessage; postquitmessage; printdialog; printdialogproc; printdib; printdlg; printimage; processcderror; profilesize; propertysheet; readdibfile; readdibfromfile; readfile; rectheight; rectwidth; regclosekey; regcreatekeyex; registerclassex; registercmmproc; registericmviewclasses; regopenkey; regopenkeyex; regqueryvalueex; regsetvalueex; releasedc; removeprop; safefree; safelock; safeunlock; savedibinfodlgpage; savedibtofile; savedibtofiledialog; scrollchildwindow; scrollwindowex; selectprinter; senddlgitemmessage; sendmessage; set_dwflag; setabortproc; setcolormatchuiflags; setcursor; setdlgitemtext; setdlgmsgresult; setdwflags; setfilepointer; setfocus; seticmmode; seticmprofile; setlasterror; setmenuiteminfo; setprop; setrect; setscrollinfo; setsettings; setupcolormatching; setupdc; setwindowlong; setwindowpos; setwindowtext; showwindow; sizescrollbars; spl_enumprinters; start_wait_cursor; startdoc; startpage; stretchdibits; support_gamma_ramps; swap; systemparametersinfo; termprinting; toggle_boolean; transformdiboutsidedc; transformprogress; transformprogressproc; translatebitmapbits; translatecolors; translatecolortable; translatemessage; updaterecentfiles; updatestring; updatewindow; va_end; va_start; verqueryvalue; warning; widthbytes; winmain; wndproc; writefile; wsprintf; wsprintfa; wvsprintf; wvsprintfa