当前位置: 代码迷 >> Brew >> BUIW的小例子解决办法
  详细解决方案

BUIW的小例子解决办法

热度:1511   发布时间:2013-02-26 00:00:00.0
BUIW的小例子
/*===========================================================================  
  
FILE: helloformapp.c  
===========================================================================*/  
   
   
/*===============================================================================  
INCLUDES AND VARIABLE DEFINITIONS  
=============================================================================== */  
   
#include "AEE.h" // Standard AEE Declarations  
#include "AEEShell.h" // AEE Shell Services  
#include "AEEFont.h" // AEE Font Services  
#include "AEEDisp.h" // AEE Display Services  
#include "AEEStdLib.h" // AEE StdLib Services  
#include "AEERootForm.h"  
#include "AEEStaticWidget.h"  
#include "AEEImageWidget.h"  
#include "AEEImageStaticWidget.h"  
#include "AEETitleWidget.h"  
#include "AEEComUtil.h"  
   
#include "bid/helloformapp.bid"  
#include "bid\AEECLSID_ROOTFORM.bid"  
#include "bid\AEECLSID_FORM.bid"  
#include "bid\AEECLSID_STATICWIDGET.bid"  
   
#ifndef RELEASEIF  
#define RELEASEIF(p) ReleaseIf((IBase**)(void *)&p)  
static void ReleaseIf(IBase **ppif) {  
  if (*ppif) {  
  IBASE_Release(*ppif);  
  *ppif = 0;  
  }  
}  
#endif  
   
/*-------------------------------------------------------------------  
Applet structure. All variables in here are reference via "me->"  
-------------------------------------------------------------------*/  
// create an applet structure that's passed around. All variables in  
// here will be able to be referenced as static.  
typedef struct _helloformapp {  
   
  IApplet ia;  
  IAppletVtbl iavt;  
  int nRefs;  
  IDisplay *pIDisplay; // give a standard way to access the Display interface  
  IShell *pIShell; // give a standard way to access the Shell interface  
  IModule *pIModule;  
   
  // add your own variables here...  
  IRootForm *piRootForm; // root form  
  IForm *piForm; // form to be displayed  
} helloformapp;  
   
static const AECHAR awchSoftkey1[] = {'T','e','s','t', 0};  
static const AECHAR awchSoftkey2[] = {'E','x','i','t', 0};  
static const AECHAR awchTitle[] = {'S','a','m','p','l','e',' ','F','o','r','m', 0};  
static const AECHAR awchText[] = { 'H','e','l','l','o',' ','t','h','e','r','e',',',' ','c','a','n',' ','y','o','u',' ','s','e','e',' ','m','e','?', 0};  
static const AECHAR awchNewText[] = { 'W','e','l','l',',',' ','I',' ','s','u','p','p','o','s','e',' ','y','o','u',' ','s','a','w',' ','m','e',' ',':',')', 0};  
const RGBAVAL rgbFrmBg = MAKE_RGBA(0,0,128,255);  
const RGBAVAL rgbFrmFg = MAKE_RGBA(255,255,0,255);  
const RGBAVAL rgbFrmBrd = MAKE_RGBA(255,255,255,255);  
   
/*-------------------------------------------------------------------  
Function prototypes  
-------------------------------------------------------------------*/  
  相关解决方案