7 |
|
#include "BFW_Motoko_Draw.h" |
8 |
|
#include "oni_gl.h" |
9 |
|
|
10 |
+ |
#define CS_DROPSHADOW 0x20000 |
11 |
+ |
|
12 |
|
volatile HWND onihwnd, boxhwnd = NULL; |
13 |
|
int inclient = 0; |
14 |
|
int dragging = 0; |
18 |
|
switch (msg) |
19 |
|
{ |
20 |
|
case WM_KEYDOWN: |
19 |
– |
if (wParam == VK_F5) { |
20 |
– |
MessageBox(0, "test", "", 0); |
21 |
– |
CHARTest(); |
22 |
– |
} |
21 |
|
case WM_ACTIVATE: |
22 |
|
case WM_CHAR: |
23 |
|
case WM_KEYUP: |
38 |
|
ShowCursor(TRUE); |
39 |
|
} |
40 |
|
break; |
41 |
< |
case WM_CLOSE: |
42 |
< |
CHARTest(); |
43 |
< |
break; |
41 |
> |
// case WM_CLOSE: |
42 |
> |
// CHARTest(); |
43 |
> |
// break; |
44 |
|
case WM_DESTROY: |
45 |
|
PostQuitMessage(0); |
46 |
|
ExitProcess(0); |
64 |
|
WNDCLASSEX wc; |
65 |
|
|
66 |
|
wc.cbSize = sizeof(WNDCLASSEX); |
67 |
< |
wc.style = 0; |
67 |
> |
wc.style = (opt_border ? 0 : (opt_shadow ? CS_DROPSHADOW : 0)); |
68 |
|
wc.lpfnWndProc = DDrHack_WndProc; |
69 |
|
wc.cbClsExtra = 0; |
70 |
|
wc.cbWndExtra = 0; |
82 |
|
re.top = (GetSystemMetrics(SM_CYSCREEN) / 2) - (480 / 2); |
83 |
|
re.right = re.left + 640; |
84 |
|
re.bottom = re.top + 480; |
85 |
< |
AdjustWindowRect(&re, WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU, FALSE); |
85 |
> |
AdjustWindowRect(&re, WS_POPUP | (opt_border ? WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU : 0), FALSE); |
86 |
|
|
87 |
< |
boxhwnd = CreateWindowEx(0, "OniGanbatte", "Oni", WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU, re.left, re.top, re.right - re.left, re.bottom - re.top, NULL, NULL, DDrDLLModule, NULL); |
90 |
< |
ShowWindow(boxhwnd, SW_SHOW); |
91 |
< |
UpdateWindow(boxhwnd); |
87 |
> |
boxhwnd = CreateWindowEx(0, "OniGanbatte", "Oni", WS_POPUP | (opt_border ? WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU : 0), re.left, re.top, re.right - re.left, re.bottom - re.top, NULL, NULL, DDrDLLModule, NULL); |
88 |
|
|
89 |
|
while (GetMessage(&Msg, NULL, 0, 0) > 0) |
90 |
|
{ |
116 |
|
re.top = (GetSystemMetrics(SM_CYSCREEN) / 2) - (cy / 2); |
117 |
|
re.right = re.left + cx; |
118 |
|
re.bottom = re.top + cy; |
119 |
< |
AdjustWindowRect(&re, WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU, FALSE); |
119 |
> |
AdjustWindowRect(&re, WS_POPUP | (opt_border ? WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU : 0), FALSE); |
120 |
|
|
121 |
< |
SetWindowPos(boxhwnd, NULL, re.left, re.top, re.right - re.left, re.bottom - re.top, uFlags | SWP_NOOWNERZORDER); |
121 |
> |
SetWindowPos(boxhwnd, opt_topmost ? HWND_TOPMOST : NULL, re.left, re.top, re.right - re.left, re.bottom - re.top, (opt_topmost ? uFlags & ~SWP_NOZORDER : uFlags | SWP_NOOWNERZORDER)); |
122 |
> |
ShowWindow(boxhwnd, SW_SHOW); |
123 |
> |
UpdateWindow(boxhwnd); |
124 |
|
return SetWindowPos(hWnd, NULL, 0, 0, cx, cy, uFlags | SWP_NOOWNERZORDER); |
125 |
|
} |
126 |
|
|