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

CResourceWindow

Methods Index

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

CResourceWindow


Heritage

Superclass: CResource

Subclasses: None


Description

This class provides the mechanism for XVT-Power++ to read in windows and associated controls description from the URL file.


Usage

const short kResErrBase = 5150;                                                    
CResource *theRes = new CResourceWindow(WIN_ID);
PwrAssert(theRes, kResErrBase + 1,
"Unable to bake resource.");

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

long theId;
while (theId = theRes->NextItem()) {
CObjectRWC *theObject = NULL;
switch (theRes->GetItemType(theId)) {
case WC_BUTTON:
theObject = new NButton(itsEnclosure,
WIN_ID, theId);
break;
case WC_EDIT:
theObject = new NEdit(itsEnclosure, WIN_ID,
theId);
break;
}
PwrAssert(theObject, kResErrBase + 2,
"Unable to bake resource item.");
theRes->IObject(theId, theObject);
CastPtr(CView, theObject)->SetCommand(theId);
}
theRes->Release();
delete theRes;

Protected Data Members

long itsCurrIndex; An index to the current window or control resource in the list of window resources
WIN_DEF* itsWinDef; The associated XVT WIN_DEF array of structures (see the XVT Portability Toolkit Guide.


Public Methods

Constructor and Destructor

CResourceWindow(long theId);
virtual ~CResourceWindow(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

Utility Methods

void ConvertWinDefUnits(void);
WIN_DEF* FindWinDefEntry(long theId);

Copy and Assignment

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


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

support@xvt.com


Visit our online help desk for tech support

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