by tsales » Fri Jul 28, 2006 8:16 am
Aqui lo tienes
Saludos
ESTO ES PRG
=========
// FiveWin for Pocket PC - Testing menus with bitmaps
#include "FWCE.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
DEFINE WINDOW oWnd TITLE "Menus & bmps" ;
MENU BuildMenu()
ACTIVATE WINDOW oWnd ;
ON CLICK MsgInfo( "Click!" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu, lactivo := .f.
DEFAULT lActivo := 1
DEFINE MENU oMenu RESOURCE 102
*BITMAPS 10 ; // bitmap resources ID
*IMAGES 2 // number of images in the bitmap
REDEFINE MENUITEM ID 110 OF oMenu ACTION MsgInfo( "OK" ) WHEN .F.
REDEFINE MENUITEM ID 120 OF oMenu ACTION oWnd:SetMenu( BuildMenu2() )
return oMenu
//----------------------------------------------------------------------------//
function BuildMenu2()
local oMenu
DEFINE MENU oMenu RESOURCE 103 ;
BITMAPS 20 ;
IMAGES 1
REDEFINE MENUITEM ID 110 OF oMenu ACTION MsgInfo( "OK" )
REDEFINE MENUITEM ID 120 OF oMenu ACTION oWnd:SetMenu( BuildMenu() )
return oMenu
//----------------------------------------------------------------------------//
ESTO ES RC
========
#include "c:\vce\include\arm\windows.h"
#include "c:\vce\include\arm\commctrl.h"
#define I_IMAGENONE (-2)
#define IDS_HELP 104
102 RCDATA
{
102, 3,
0, 110, TBSTATE_ENABLED, TBSTYLE_BUTTON, 201, 0, 0,
0, 105, TBSTATE_ENABLED, TBSTYLE_SEP,-1, 0, 0
1, 120, TBSTATE_ENABLED, TBSTYLE_BUTTON, 202, 0, 0
}
103 RCDATA
{
103, 2,
0, 110, TBSTATE_ENABLED, TBSTYLE_BUTTON, 204, 0, 0,
I_IMAGENONE, 120, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE, 205, 0, 1
}
STRINGTABLE
{
201, "OK"
202, "Cancel"
204, "OK"
205, "Cancel"
}
102 MENU DISCARDABLE
{
MENUITEM "", 110
MENUITEM "", 120
}
103 MENU DISCARDABLE
{
MENUITEM "", 110
MENUITEM "", 120
}
10 BITMAP "../bitmaps/pocket/okcancel.bmp"
20 BITMAP "../bitmaps/pocket/EDIT.bmp"
Toni Sales