#include <cywin.h>
...
{
struct cList menu;
struct BitmapSequence menu_icons;
struct module_t main_module;
struct Message* ptr_message;
struct cItem* ptr_menu_item;
static const char* sz_menu_text[3] = {
"CYBIKO",
"Microsoft",
"Ford"
};
static const char* sz_right_text[3] = {
"Yang",
"Gates",
"Ford"
};
...
init_module( &main_module );
...
cList_ctor( &menu, 100 );
BitmapSequence_ctor_Ex( &menu_icons , "logos.pic");
for( index = 0; index < 3; index++ )
{
ptr_menu_item = (struct cItem* )malloc ( sizeof ( struct cItem ) );
cItem_ctor( ptr_menu_item,
100,
sz_menu_text[index],
FALSE,
sz_right_text[index],
BitmapSeqence_get_bitmap( &menu_icons, index ) );
cList_AddItem( &menu, ptr_menu_item );
}
cWinApp_AddObj( main_module.m_process, &menu, 10, 40 );
...
cList_dtor( &menu, LEAVE_MEMORY );
BitmapSequence_dtor( &menu_icons, LEAVE_MEMORY );
}