Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
WindowTools.h
1
#ifndef WINDOW_TOOLS_H
2
#define WINDOW_TOOLS_H
3
4
BEGIN_MOOTOOLS_NAMESPACE
5
6
DLL_TOOLSFUNCTION
void
ActivateWindow(CXWinWnd *
pWnd
,
BOOL
switchWindow
,
BOOL
show
=
TRUE
);
7
DLL_TOOLSFUNCTION CXWinWnd *FindWindowByClassName(
const
CXString
&
classname
);
8
9
#ifndef MOOTOOLS_NO_UI
10
11
// Messages box
12
DLL_TOOLSFUNCTION
int
CMessageBox
(
LPCTSTR
lpszText
,
UINT
nType
=
MB_OK
,
UINT
nIDHelp
= 0);
13
DLL_TOOLSFUNCTION
int
CMessageBox
(
UINT
nIDPrompt
,
UINT
nType
=
MB_OK
,
UINT
nIDHelp
= (
UINT
)-1);
14
15
DLL_TOOLSFUNCTION
void
WarningBox
(
int
,
int
);
16
DLL_TOOLSFUNCTION
void
WarningBox
(
const
CXString
&,
const
CXString
&);
17
DLL_TOOLSFUNCTION
void
ShowLastError
(
DWORD
lastError
);
18
19
typedef
enum
_SetWindowInDisplayEnum
20
{
21
SETWINDOW_DEFAULT
= 0x00,
22
SETWINDOW_MOVEWINDOW
= 0x01,
// Perform the window's move
23
SETWINDOW_SHOW_ALLWINDOW
= 0x02,
// Window fit in the screen
24
SETWINDOW_PREVENT_CENTER
= 0x04,
// Do not center no moveable windows
25
SETWINDOW_XY_IS_BOTTOMRIGTH
= 0x08,
// Align the window from the bottom right pos
26
}
SetWindowInDisplayEnum
;
27
28
// Window useful functions
29
DLL_TOOLSFUNCTION
COLORREF
GetParentBackgroundColor
(
CXWnd
*
pWnd
,
COLORREF
defaultColor
);
30
DLL_TOOLSFUNCTION
void
SetWindowInDisplay
(
CXWnd
*
pWnd
,
int
& x,
int
& y,
unsigned
int
flags =
SETWINDOW_DEFAULT
);
31
DLL_TOOLSFUNCTION
CXWnd
*
FindMainThreadWindow
(
DWORD
threadID
);
32
DLL_TOOLSFUNCTION
CRect
GetViewportRect
(
CXWnd
*);
33
DLL_TOOLSFUNCTION
CPoint
GetViewportOffset
(
CXWnd
*);
34
DLL_TOOLSFUNCTION
bool
IsDescendant
(
HWND
hWndParent
,
HWND
hWndChild
);
35
DLL_TOOLSFUNCTION
CXWnd
*
FindMainThreadWindow
(
DWORD
threadID
);
36
DLL_TOOLSFUNCTION
CXWnd
*
GetCursorWnd
(
bool
checkLButtonDown
);
37
38
// Picker color
39
typedef
BOOL
(*
PickColorCallback
)(
COLORREF
& color,
void
*data);
40
bool
DLL_TOOLSFUNCTION
PickColor
(
CXWnd
*
pWnd
,
COLORREF
& color,
PickColorCallback
callback,
void
*data);
41
bool
DLL_TOOLSFUNCTION
DisplayStringMatchMenu
(
CEdit
*
pEdit
);
42
43
class
DLL_TOOLSFUNCTION
CLockWndRedraw
44
{
45
CXWnd
*
pWnd
;
46
int
count;
47
48
public
:
49
typedef
enum
XEnumType
(
unsigned
int
)
50
{
51
LOCKWND_DEFAULT
= 0x00,
// This call SetRedraw when lock and unlock is reached
52
LOCKWND_FORCEREDRAW
= 0x01,
// This also call RedrawWindow when unlocking is reached
53
LOCKWND_LOCKONLY
= 0x02,
// This only increment / decrement the lock without any action on the window
54
}
LockFlags
;
55
56
CLockWndRedraw
();
57
CLockWndRedraw
(
CXWnd
*
pWnd
);
58
virtual
~CLockWndRedraw
();
59
60
void
SetWnd
(
CXWnd
*
pWnd
,
bool
lock);
61
void
Lock(
bool
lock,
unsigned
int
forceRedraw
=
LOCKWND_DEFAULT
);
62
bool
IsLock
()
const
{
return
(count > 0); };
63
};
64
65
// Dark Mode / Rounded Windows
66
DLL_TOOLSFUNCTION
void
ApplyW11FeaturesToWnd
(
HWND
hWnd
);
67
DLL_TOOLSFUNCTION
void
SetDarkMode
(
HWND
hWnd
,
bool
useSystemSetting
=
true
);
68
DLL_TOOLSFUNCTION
void
SetRoundedWindows
(
HWND
hWnd
);
69
70
#endif
71
72
END_MOOTOOLS_NAMESPACE
73
74
#endif
// WINDOW_TOOLS_H
C3DTPoint
The class defines an x, y, z 3D point which can use int, float or double.
Definition
3DPoint.h:27
CXTString< TCHAR >
VS2022-PolygonCruncherSDK-Full-IO
SDK
Includes
WindowTools.h
Generated by
1.9.8