soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SDefine.h
1#ifndef __SDEFINE__H__
2#define __SDEFINE__H__
3
4// DISALLOW_COPY_AND_ASSIGN禁用拷贝和赋值构造函数.
5// 需要在类的private:访问控制域中使用.
6#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
7 TypeName(const TypeName &); \
8 void operator=(const TypeName &)
9
10#ifndef NOSMINMAX
11#ifndef smax
12#define smax(a, b) (((a) > (b)) ? (a) : (b))
13#endif
14
15#ifndef smin
16#define smin(a, b) (((a) < (b)) ? (a) : (b))
17#endif
18#endif
19
20#define sround(x) ((int)(x + 0.5f))
21
22#ifndef GET_X_LPARAM
23#define GET_X_LPARAM(lParam) ((int)(short)LOWORD(lParam))
24#endif
25#ifndef GET_Y_LPARAM
26#define GET_Y_LPARAM(lParam) ((int)(short)HIWORD(lParam))
27#endif
28
29#ifdef _DISABLE_NO_VTABLE
30#define S_NO_VTABLE
31#else
32#define S_NO_VTABLE __declspec(novtable)
33#endif
34
35// SWindow Handle
36typedef DWORD SWND;
37typedef ULONG_PTR HSTREEITEM;
38
39#endif // __SDEFINE__H__