ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_WindowHack.c
(Generate patch)

Comparing Daodan/src/Daodan_WindowHack.c (file contents):
Revision 435 by gumby, Fri Jul 17 01:50:03 2009 UTC vs.
Revision 468 by rossy, Sun Oct 18 02:26:30 2009 UTC

# Line 7 | Line 7
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;
# Line 16 | Line 18 | LRESULT CALLBACK DDrHack_WndProc(HWND hw
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:
# Line 40 | Line 38 | LRESULT CALLBACK DDrHack_WndProc(HWND hw
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);
# Line 66 | Line 64 | DWORD WINAPI DDrHack_WndMain(LPVOID para
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;
# Line 84 | Line 82 | DWORD WINAPI DDrHack_WndMain(LPVOID para
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          {
# Line 120 | Line 116 | BOOL WINAPI glpi_SetWindowPosHook(HWND h
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)