forked from jrywu/DIME
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShadowWindow.h
47 lines (37 loc) · 976 Bytes
/
ShadowWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
//
// Derived from Microsoft Sample IME by Jeremy '13,7,17
//
//
#pragma once
#include "BaseWindow.h"
class CShadowWindow : public CBaseWindow
{
public:
CShadowWindow(_In_ CBaseWindow *pWndOwner)
{
_pWndOwner = pWndOwner;
_color = RGB(0, 0, 0);
_sizeShift.cx = 0;
_sizeShift.cy = 0;
_isGradient = FALSE;
}
virtual ~CShadowWindow()
{
}
BOOL _Create(ATOM atom, DWORD dwExStyle, DWORD dwStyle, _In_opt_ CBaseWindow *pParent = nullptr, int wndWidth = 0, int wndHeight = 0);
void _Show(BOOL isShowWnd);
LRESULT CALLBACK _WindowProcCallback(_In_ HWND wndHandle, UINT uMsg, WPARAM wParam, LPARAM lParam);
void _OnSettingChange();
void _OnOwnerWndMoved(BOOL isResized);
private:
BOOL _Initialize();
void _InitSettings();
void _AdjustWindowPos();
void _InitShadow();
private:
CBaseWindow* _pWndOwner;
COLORREF _color;
SIZE _sizeShift;
BOOL _isGradient;
};