Ignore:
Timestamp:
Oct 18, 2009, 4:26:30 AM (16 years ago)
Author:
rossy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Daodan_WindowHack.c

    r435 r468  
    77#include "BFW_Motoko_Draw.h"
    88#include "oni_gl.h"
     9
     10#define CS_DROPSHADOW 0x20000
    911
    1012volatile HWND onihwnd, boxhwnd = NULL;
     
    1719        {
    1820                case WM_KEYDOWN:
    19                         if (wParam == VK_F5) {
    20                                 MessageBox(0, "test", "", 0);
    21                                 CHARTest();
    22                         }
    2321                case WM_ACTIVATE:
    2422                case WM_CHAR:
     
    4139                        }
    4240                        break;
    43                 case WM_CLOSE:
    44                         CHARTest();
    45                         break;
     41//              case WM_CLOSE:
     42//                      CHARTest();
     43//                      break;
    4644                case WM_DESTROY:
    4745                        PostQuitMessage(0);
     
    6765       
    6866        wc.cbSize = sizeof(WNDCLASSEX);
    69         wc.style = 0;
     67        wc.style = (opt_border ? 0 : (opt_shadow ? CS_DROPSHADOW : 0));
    7068        wc.lpfnWndProc = DDrHack_WndProc;
    7169        wc.cbClsExtra = 0;
     
    8583        re.right = re.left + 640;
    8684        re.bottom = re.top + 480;
    87         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);
    8886       
    89         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);
    9288       
    9389        while (GetMessage(&Msg, NULL, 0, 0) > 0)
     
    121117        re.right = re.left + cx;
    122118        re.bottom = re.top + cy;
    123         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);
    124120       
    125         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);
    126124        return SetWindowPos(hWnd, NULL, 0, 0, cx, cy, uFlags | SWP_NOOWNERZORDER);
    127125}
Note: See TracChangeset for help on using the changeset viewer.