vbrewframe.cpp

来自「象棋框架」· C++ 代码 · 共 39 行

CPP
39
字号
/*===========================================================================
FILE: VBrewFrame.c
===========================================================================*/
#include "VBrewFrame.h"

int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj){
  *ppObj = NULL;
  if (ClsId == AEECLSID_BREWFRAME){
    if (AEEApplet_New(sizeof(CVBrewFrame), ClsId, pIShell, po, (IApplet **)ppObj, (AEEHANDLER)CVBrewFrame::HandleEvent, (PFNFREEAPPDATA)CVBrewFrame::freeAppData) == TRUE){
      if (CVBrewFrame::initAppData((CVBrewFrame *)*ppObj) == TRUE)
        return (AEE_SUCCESS);
      IAPPLET_Release((IApplet *)*ppObj);
      *ppObj = NULL;
	}
  }
  return (EFAILED);
}

boolean CVBrewFrame::HandleEvent(CVBrewFrame *pApp, AEEEvent eCode, uint16 wParam, uint32 dwParam){
  if (pApp->frame != NULL)
	return pApp->frame->onEvent(eCode, wParam, dwParam);
  return FALSE;
}

boolean CVBrewFrame::initAppData(CVBrewFrame *pApp){
  pApp->frame = CreateBrewFrame(pApp);
  if (pApp->frame != NULL)
	return pApp->frame->initData();
  return TRUE;
}

void CVBrewFrame::freeAppData(CVBrewFrame *pApp){
  if (pApp->frame != NULL){
	pApp->frame->freeData();
	pApp->frame->Release();
	pApp->frame = NULL;
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?