1 Star 0 Fork 0

清泠/未完成

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
common.h 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
清泠 提交于 2022-03-01 13:36 +08:00 . 上传代码
#pragma once
#include <Windows.h>
#include <vector>
#include <list>
#include <set>
#include <map>
#pragma warning(disable:4018) //有符号/无符号不匹配
#pragma warning(disable:4244) //从float转换到int,可能丢失数据
#pragma warning(disable:4996) //function or variable may be unsafe
struct RectWH_t
{
public:
int Left;
int Top;
int Width;
int Height;
inline RectWH_t()
{
Clear();
}
inline RectWH_t(int l,int t,int w,int h)
{
this->Left=l;
this->Top=t;
this->Width=w;
this->Height=h;
}
inline int Right()
{
return Left+Width;
}
inline int Bottom()
{
return Top+Height;
}
inline void Clear()
{
this->Left=0;
this->Top=0;
this->Width=0;
this->Height=0;
}
inline void FromRectF(void* RectF_RB)
{
float* RectFPtr=(float*)RectF_RB;
this->Left=(int)RectFPtr[0];
this->Top=(int)RectFPtr[1];
this->Width=int(RectFPtr[2]-RectFPtr[0]);
this->Height=int(RectFPtr[3]-RectFPtr[1]);
}
inline operator RECT()
{
RECT rt;
rt.left=Left;
rt.top=Top;
rt.right=Left+Width;
rt.bottom=Top+Height;
return rt;
}
};
typedef bool (*wstrless_t)(WCHAR*,WCHAR*);
bool wstrless(WCHAR* s1,WCHAR* s2);
WCHAR* wcsdup2(WCHAR* wstr);
WCHAR* wcsdup2flt(WCHAR* wstr);
int GenerateId();
BOOL PointInRect(int X,int Y,int Left,int Top,int Width,int Height);
void SetImmBoxPosition(HWND hWnd,int X,int Y);
WCHAR* GetImmResultString(HWND hWnd,int* LenOut);
extern const int ViewWidth;
extern const int ViewHeight;
extern const int FrameDelay;
class CDirect2dManager;
class CResourceManager;
class CUIManager;
extern CDirect2dManager* D2dMgr;
extern CResourceManager* ResMgr;
extern CUIManager* UiMgr;
//参数1是类型
//当参数1为0时,表示汇报,参数2是新增的完成数
//当参数1为1时,表示完成,参数2为0
#define WM_THREADCOMMAND (WM_USER+1)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zclear/calc_temp.git
git@gitee.com:zclear/calc_temp.git
zclear
calc_temp
未完成
master

搜索帮助