03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Epoc file: Hellogui.mbm<br />

Bitmap file 1 : icon.bmp<br />

Bitmap file 2 : icon2.bmp<br />

Bitmap file 3 : iconmask.bmp<br />

Bitmap file 4 : icon2mask.bmp<br />

Success.<br />

To extract .bmp files from a multibitmap file you specify a /u flag after the bmconv<br />

command, for example:<br />

bmconv /u Hellogui.mbm icon.bmp icon2.bmp iconmask.bmp icon2mask.bmp<br />

One useful application of this facility is to capture a screen from the emulator using<br />

Ctrl+Alt+Shift+S. This results in a .mbm file containing a single entry. Once you have<br />

extracted the bitmap, you can display and manipulate it using an editor such as Paint Shop<br />

Pro.<br />

You can also view the contents of a .mbm file by specifying a /v flag after the command:<br />

bmconv /v Hellogui.mbm<br />

To see the full set of supported options, just type bmconv on the command line.<br />

14.2 Adding Application Icons<br />

Now that we've seen how to handle bitmap and resource conversion for adding buttons to a<br />

button bar, we can generate an application icon and a better caption for HelloGUI, to be<br />

visible from the Application Launcher of your UIQ smartphone.<br />

Here is what the application icon will appear as in Figure 14.5.<br />

Figure 14.5<br />

As we saw in <strong>Chapter</strong> 13, the icon and caption, along with some other information about an<br />

application's capabilities are contained in an application information file or AIF. Without an<br />

AIF, the application uses the default system icon (consisting of two squares on a gray<br />

background with a black border), displays a caption identical to its filename, and is assumed<br />

not to be associated with any MIME file types. The AIF has the same name as the<br />

application, and resides in the same directory – unsurprisingly, its extension is .aif.<br />

An AIF is created with the aid of aiftool.exe and the two main ways of using it are:<br />

� using aiftool as part of the application build process, by adding a statement to the<br />

project specification file, as we did with .mbm files earlier<br />

� using aiftool directly.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!