📄 framecom.h
字号:
// ***************************************************************
// FrameCom version: 1.0
// -------------------------------------------------------------
// File Name: FrameCom.h
// Created: 2007/07/18
// Modified: 2007/07/18 16:31
// Author: William.Liang
// Msn: lwq49@msn.com
// Email: lwq49@21cn.com, lwq49@msn.com
// Description:
//
// Purpose:
// -------------------------------------------------------------
// license:
//
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.mozilla.org/MPL/ Software dis-
// tributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
// plied. See the License for the specific language governing
// rights and limitations under the License.
//
// The Initial Developer of the Original Code is William.Liang .
// Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#ifndef FRAME_COM_HEAD_FILE
#define FRAME_COM_HEAD_FILE
//////////////////////////////////////////////////////////////////////////
//平台头文件
#include "..\ObjectCom\ObjectCom.h"
//////////////////////////////////////////////////////////////////////////
//导出定义
#ifndef FRAME_COM_CLASS
#ifdef FRAME_COM_DLL
#define FRAME_COM_CLASS _declspec(dllexport)
#else
#define FRAME_COM_CLASS _declspec(dllimport)
#endif
#endif
//模块定义
#ifdef _DEBUG
#define FRAME_COM_DLL_NAME TEXT("FrameComD.dll") //组件 DLL 名字
#else
#define FRAME_COM_DLL_NAME TEXT("FrameCom.dll") //组件 DLL 名字
#endif
#define VER_IFrameObject INTERFACE_VERSION(1,1)
static const GUID IID_IFrameObject={0xbd02b27d,0x7274,0x46a5,0x82,0x7b,0xc4,0x49,0x83,0xfe,0x9b,0x76};
//框架接口
interface IFrameObject : public IUnknownEx
{
//扩展方法
public:
//设置父对象
virtual void __cdecl SetParent(IUnknownEx* pIUnknownEx)=NULL;
//返回父对象
virtual IUnknownEx* __cdecl GetParent()=NULL;
//坐标相关
public:
//移动对象
virtual void __cdecl MoveTo(_POINT piPoint)=NULL;
// 返回对象坐标相对于屏幕
virtual _POINT __cdecl GetScreenPosition()=NULL;
// 返回对象相对于容器的坐标
virtual _POINT __cdecl GetLocalPosition()=NULL;
// 返回对象容器坐标
virtual _POINT __cdecl GetContainerPosition()=NULL;
//返回中心点
virtual _POINT __cdecl GetAnchorPosition()=NULL;
//计算容器坐标
virtual void __cdecl CalcContainerPosition()=NULL;
//屏幕坐标转本地坐标
virtual _POINT __cdecl ScreenToLocal(_POINT piScreen)=NULL;
//本地坐标转屏幕坐标
virtual _POINT __cdecl LocalToScreen(_POINT piLocal)=NULL;
//共通方法
public:
//设置名字
virtual void __cdecl SetObjectName(LPCTSTR lpName)=NULL;
//获取名字
virtual LPCTSTR __cdecl GetObjectName()=NULL;
//设置可视
virtual void __cdecl SetVisabled(bool bFlag)=NULL;
//设置禁用
virtual void __cdecl SetDisabled(bool bFlag)=NULL;
//是否可视
virtual bool __cdecl IsVisabled()=NULL;
//是否禁用
virtual bool __cdecl IsDisabled()=NULL;
//返回深度
virtual DWORD __cdecl GetDepth()=NULL;
//设置深度
virtual void __cdecl SetDepth(DWORD dwDepth)=NULL;
//设置中心
virtual void __cdecl SetAnchorPosition(_POINT piPoint)=NULL;
//返回大小
virtual void __cdecl SetSize(_SIZE siSize)=NULL;
//返回大小
virtual _SIZE __cdecl GetSize()=NULL;
//返回基本信息
virtual BASALINFO& __cdecl GetBasalInfo()=NULL;
//交换深度
virtual void __cdecl SwitchDepth(IUnknownEx* pIObject1, IUnknownEx* pIObject2)=NULL;
//交换深度
virtual void __cdecl SwitchDepth(IUnknownEx* pIObject, DWORD dwNewDepth)=NULL;
//渲染场景
virtual void __cdecl Render(WPARAM wParam=NULL)=NULL;
//预渲染
virtual void __cdecl PreRender(WPARAM wParam=NULL)=NULL;
};
//导出类头文件
#ifndef FRAME_COM_DLL
#include "FrameObject.h"
#include "GameView.h"
#include "GameScene.h"
#include "GameLayer.h"
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -