03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EMbmHelloguiIcon,<br />

EMbmHelloguiIconmask,<br />

EMbmHelloguiIcon2,<br />

EMbmHelloguiIcon2mask,<br />

EMbmHelloguiIcon3,<br />

EMbmHelloguiIcon3mask<br />

};<br />

The naming convention here is clear enough: there's an enumeration whose type name<br />

includes the MBM filename, and several enumerated constants whose names are made up<br />

from the MBM filename and the source bitmap filename.<br />

You will need to use the enumerations generated in this file, in the resource file, as<br />

described below.<br />

14.1.3 Changing the Resource File<br />

Before you can rebuild your application and convert the bitmaps into a.mbm file, you need to<br />

define exactly how your icons should appear on the button bar. You do this by referencing<br />

the bitmap files and corresponding masks from the application resource file. The information<br />

you need to add includes:<br />

� the names of all the icon bitmaps<br />

� the names of all the mask bitmaps<br />

� the name and location of the .mbm file that contains them<br />

� a specification of the function of each button<br />

� optionally, where to insert any button text in relation to the bitmap. The resource file,<br />

HelloGui.rss, needs the following additional #include statements:<br />

#include <br />

#include <br />

and the button bar is specified within the RESOURCE EIK_APP_INFO statement, as shown<br />

below:<br />

RESOURCE EIK_APP_INFO<br />

{<br />

hotkeys = r_hellogui_hotkeys;<br />

menubar = r_hellogui_menubar;<br />

toolbar = r_example_toolbar;<br />

}<br />

The named button bar is defined in a QIK_TOOLBAR resource, as follows:<br />

RESOURCE QIK_TOOLBAR r_example_toolbar<br />

{<br />

controls=<br />

of bar.<br />

{<br />

QIK_TBAR_BUTTON // Done image button aligned to right side<br />

{

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

Saved successfully!

Ooh no, something went wrong!