[Classes] [Prev] [Next] [Methods]

CResourceMenu

Methods Index

Heritage
Description
Usage
Enums
Protected Data Members
Public Methods
Constructor and Destructor
Resource State Methods
Resource Item Methods
Protected Methods
Copy and Assignment
Utility Methods

CResourceMenu


Heritage

Superclass: CResource

Subclasses: None


Description

This class provides the mechanism for XVT-Power++ to read in a menu description from the URL file.


Usage

CMenuBar theMenuBar(theWin, MENU_ID);
const short kResErrBase = 5150;
CResource *theRes = new CResourceMenu(MENU_BAR_RID);
PwrAssert(theRes, kResErrBase + 1,
"Unable to bake resource.");

theRes->Hold();
theRes->FirstItem(); // reset iterator

long theId;
while (theId = theRes->NextItem()) {
CSubmenu theSubmenu;
theRes->IObject(theId, &theSubmenu);
theMenuBar.AppendSubmenu(theSubmenu);
}
theRes->Release();
delete theRes;

Enums

PwrResourceMenuType

The following are the possible types returned by GetItemType:

PwrSubMenu
PwrMenuItem


Protected Data Members

long itsCurrIndex; An index to the current menu in the list of menu resources (CResource::itsResources)
MENU_ITEM* itsMenuDef; The associated XVT MENU_ITEM array of structures, see the XVT Portability Toolkit Guide.


Public Methods

Constructor and Destructor

CResourceMenu(long theId);
virtual ~CResourceMenu(void);

Resource State Methods

virtual BOOLEAN Hold(void);
virtual void Release(void);

Resource Item Methods

virtual BOOLEAN IObject(long theId, 
CObjectRWC *theObject);
virtual long FirstItem(void);
virtual long NextItem(void);
virtual long GetItemType(long theId);

Protected Methods

Copy and Assignment

CResourceMenu(const CResourceMenu &theResource);
CResourceMenu & operator=(
const CResourceMenu &theResource);

Utility Methods

void BuildSubmenu(MENU_ITEM *theXVTMenu, 
CSubmenu *theSubMenu, CMenu *theMenu);
void InitMenu(MENU_ITEM* theXVTMenu, CMenu *theMenu);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.