ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

article
part 1
part 2
part 3
part 4
part 5


3 - Coding Your Graphics

The BMPCONVERT.EXE converts bitmaps to a series of C/C++ statements you can paste into your program, representing the original image (see the SDK for further details on its use). Once the data is created, it can be pasted into the program, added to your program by editing your make file, or #INCLUDEd in your source. However, this latter method isn't as easy to maintain, and should be avoided in larger projects.

Now on to displaying. The simplest way is to create an CIcon object:

CIcon( U16 id, const IMAGE *image );

Creating a CIcon is similar to creating a button or checkbox, in that you pass a new instance to the AddChild() function in the window constructor. From there, the window takes over the display of the image, making this a simple way to add static bitmaps to your program. Another advantage is that you can use the Form Editor to position the image, further reducing your workload.

Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice