Multiple Document Interface (MDI) : Review Topics
Multiple Document Interface (MDI) : Review Topics
An MDI application is something like the Windows desktop interface since both include multiple viewing spaces.
However, the MDI viewing spaces are confined to the application's window or client area . Within the client area, each
document is displayed within a separate child window . MDI applications can be used for a variety of purposes - for
example, working on one document while referring to another document, viewing different presentations of the same
information, viewing multiple Web sites at the same time, and any task that requires multiple reference points and work
areas at the same time
IMAGE LISTS
An image list is a collection of images of the same size, each of which can be referred to by its index. Image lists
are used to efficiently manage large sets of icons or bitmaps. All images in an image list are contained in a single, wide
bitmap in screen device format. An image list can also include a monochrome bitmap that contains masks that are usually
contain.There are two types of image lists: nonmasked and masked. A nonmasked image list consists of a color bitmap
that contains one or more images. A masked image list consists of two bitmaps of equal size. The first is a color bitmap
that contains the images, and the second is a monochrome bitmap that contains a series of masks—one for each image
in the first bitmap.
When a nonmasked image is drawn, it is simply copied into the target device context; that is, it is drawn over the existing
background color of the device context. When a masked image is drawn, the bits of the image are combined with the bits
of the mask, typically producing transparent areas in the bitmap where the background color of the target device context
shows through. There are several drawing styles that you can specify when drawing a masked image. For example, you
can specify that the image be dithered to indicate a selected object.
The following C++ code example, the application-defined function first creates image lists and then assigns them to a list-
view control or indicate a selected object to draw images transparently (icon style).
EXAMPLE:
C++
Copy
// This function only creates image lists. It does not insert the items into
//
//
hLarge = ImageList_Create(GetSystemMetrics(SM_CXICON),
GetSystemMetrics(SM_CYICON),
ILC_MASK, 1, 1);
hSmall = ImageList_Create(GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
ILC_MASK, 1, 1);
ImageList_AddIcon(hLarge, hiconItem);
ImageList_AddIcon(hSmall, hiconItem);
DestroyIcon(hiconItem);
// When you are dealing with multiple icons, you can use the previous four lines of
// code inside a loop. The following code shows such a loop. The
/*
ImageList_AddIcon(hSmall, hIconItem);
ImageList_AddIcon(hLarge, hIconItem);
Destroy(hIconItem);
}
*/
return TRUE;
TOOLBAR
Toolbars can be more efficient than menu bars because they are direct (always displayed instead of being displayed
on mouse click), immediate (instead of requiring additional input) and contain the most frequently used commands
(instead of a comprehensive list). In contrast to menu bars, toolbars don't have to be comprehensive or self-explanatory
just quick, convenient, and efficient.
Some toolbars are customizable,
allowing users to add or remove
toolbars, change their size and
location, and even change their
contents. Some types of toolbars
can be undocked, resulting in a palette window. For more information about toolbar varieties, see Usage patterns in this
article.
SUMMARY
Review topics is consist of three main sub topics namely; MDI, IMAGE LISTS,and TOOLBAR. These three are
mainly used in programming, MDI is used for creating an application that enables users to work with multiple document at
the same time. While image lists are currently manage a large icon, and lastly toolbar is most likely a shortcut for working.
Reflection:
I actually learn a few things here specially for making image lists, there are two types of image lists there are
nonmasked and masked, nonmasked is consist of two or more images, masked has two bitmaps in equal size. Toolbar is
mainly a shortcut for me, so these are few lesson I’ve learned.