0% found this document useful (0 votes)
46 views7 pages

Multiple Document Interface (MDI) : Review Topics

The document discusses three topics: Multiple Document Interface (MDI), Image Lists, and Toolbars. MDI allows users to work on multiple documents simultaneously in an application. Image Lists efficiently manage large sets of icons or bitmaps using a single bitmap containing indexed images. There are nonmasked and masked image lists. Toolbars provide frequently used commands in a direct interface, unlike menu bars, making commands more immediate and efficient to use.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views7 pages

Multiple Document Interface (MDI) : Review Topics

The document discusses three topics: Multiple Document Interface (MDI), Image Lists, and Toolbars. MDI allows users to work on multiple documents simultaneously in an application. Image Lists efficiently manage large sets of icons or bitmaps using a single bitmap containing indexed images. There are nonmasked and masked image lists. Toolbars provide frequently used commands in a direct interface, unlike menu bars, making commands more immediate and efficient to use.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Review topics

Multiple document interface (MDI)


MDI (Multiple Document Interface) is a Microsoft Windows programming interface for creating an application that
enables users to work with multiple documents at the same time. Each document is in a separate space with its own
controls for scrolling. The user can see and work with different documents such as a spreadsheet, a text document, or a
drawing space by simply moving the cursor from one space to another.

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

// InitListViewImageLists: Creates image lists for a list-view control.

// This function only creates image lists. It does not insert the items into

// the control, which is necessary for the control to be visible.


//

// Returns TRUE if successful, or FALSE otherwise.

//

// hWndListView: Handle to the list-view control.

// global variable g_hInst: The handle to the module of either a

// dynamic-link library (DLL) or executable (.exe) that contains

// the image to be loaded. If loading a standard or system

// icon, set g_hInst to NULL.

//

BOOL InitListViewImageLists(HWND hWndListView)

HICON hiconItem; // Icon for list-view items.

HIMAGELIST hLarge; // Image list for icon view.

HIMAGELIST hSmall; // Image list for other views.


// Create the full-sized icon image lists.

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);

// Add an icon to each image list.

hiconItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ITEM));

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

// icons are defined in the application's header file as resources, which

// are numbered consecutively starting with IDS_FIRSTICON. The number of

// icons is defined in the header file as C_ICONS.

/*

for(index = 0; index < C_ICONS; index++)

hIconItem = LoadIcon (g_hinst, MAKEINTRESOURCE(IDS_FIRSTICON + index));

ImageList_AddIcon(hSmall, hIconItem);

ImageList_AddIcon(hLarge, hIconItem);

Destroy(hIconItem);

}
*/

// Assign the image lists to the list-view control.

ListView_SetImageList(hWndListView, hLarge, LVSIL_NORMAL);

ListView_SetImageList(hWndListView, hSmall, LVSIL_SMALL);

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy