阅读:2751回复:4
【源码编辑】给飞飞添加最小化
[free][/free] _DirectX文件夹d3dapp.cpp文件
------------------------------------------------------------------------------------------------------------ *************************** d3dapp.cpp ************************** 搜索: !g_Option.m_bStartFullScreen 修改如下: if( !g_Option.m_bStartFullScreen ) { #ifdef __ZHICHIZUIXIAOHUA m_dwWindowStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_VISIBLE; #else #ifdef __CSC_VER9_4 m_dwWindowStyle = WS_OVERLAPPEDWINDOW; #else //__CSC_VER9_4 m_dwWindowStyle = WS_OVERLAPPEDWINDOW | WS_VISIBLE; #endif //__CSC_VER9_4 m_dwWindowStyle &= ~WS_MAXIMIZEBOX; m_dwWindowStyle &= ~WS_MINIMIZEBOX; m_dwWindowStyle &= ~WS_SYSMENU; #endif //__ZHICHIZUIXIAOHUA } ------------------------------------------------------------------------------------------------------------ 搜索: if( m_bClipCursorWhenFullscreen && !m_bWindowed ) 修改如下: if( m_bClipCursorWhenFullscreen && !m_bWindowed ) ::ClipCursor( NULL ); #else ClipCursor(); #endif //if( m_bClipCursorWhenFullscreen && !m_bWindowed ) // ClipCursor( NULL ); #ifdef __ZHICHIZUIXIAOHUA Pause( true ); // Pause while we're minimized - xuzhu啊 绊魔 #endif //__ZHICHIZUIXIAOHUA m_bMinimized = true; m_bMaximized = false; } else if( SIZE_MAXIMIZED == wParam ) ------------------------------------------------------------------------------------------------------------------- 搜索: if( m_bActive && m_pd3dDevice != NULL ) 添加如下: if( m_bActive && m_pd3dDevice != NULL ) { POINT ptCursor; GetCursorPos( &ptCursor ); if( !m_bWindowed ) ScreenToClient( m_hWnd, &ptCursor ); m_pd3dDevice->SetCursorPosition( ptCursor.x, ptCursor.y, 0 ); } break; #ifdef __ZHICHIZUIXIAOHUA case WM_NCMOUSEMOVE: //标题栏移动鼠标 SetCursor(LoadCursor(NULL,IDC_ARROW)); break; #endif //__ZHICHIZUIXIAOHUA case WM_ENTERMENULOOP: // Pause the app when menus are displayed Pause(true); break; --------------------------------------------------------------------------------------------------------- 搜索: case SC_MONITORPOWER: if( false == m_bWindowed ) return 1; break; 添加如下: case SC_MONITORPOWER: if( false == m_bWindowed ) return 1; break; #ifdef __ZHICHIZUIXIAOHUA case SC_CLOSE: //如果各种任务栏都没打开,那么没有进入游戏呢,直接关闭 if(!g_WndMng.IsOpenWnd(APP_LOGIN) && !g_WndMng.IsOpenWnd(APP_SELECT_CHANNEL) && !g_WndMng.IsOpenWnd(APP_SELECT_SERVER) && !g_WndMng.IsOpenWnd(APP_SELECT_CHAR) && !g_WndMng.IsOpenWnd(APP_CREATE_CHAR)) /* if(!g_WndMng.IsOpenWnd(APP_TASKBAR1024) && !g_WndMng.IsOpenWnd(APP_TASKBAR800) && !g_WndMng.IsOpenWnd(APP_TASKBAR1280) && !g_WndMng.IsOpenWnd(APP_TASKBAR1360W) && !g_WndMng.IsOpenWnd(APP_TASKBAR1400) && !g_WndMng.IsOpenWnd(APP_TASKBAR1440W) && !g_WndMng.IsOpenWnd(APP_TASKBAR1600) && !g_WndMng.IsOpenWnd(APP_TASKBAR1680W)) { } */ { if (!g_WndMng.IsOpenWnd(APP_MESSAGE_TEXT)) { g_WndMng.OpenCustomBox(NULL,new CWndQuit); //OpenCustomBox( NULL, new CWndQuit ); return 1; }else{ return 1; } } break; #endif //__ZHICHIZUIXIAOHUA } break; ----------------------------------------------------------------------------------------------------------------------- 搜索: HRESULT CD3DApplication::AdjustWindowForChange() 添加如下: HRESULT CD3DApplication::AdjustWindowForChange() { if( m_bFakeFullMode ) { DWORD dwStyle = 0; if( g_Option.m_bStartFullScreen ) { dwStyle = WS_POPUP|WS_VISIBLE; } else { #ifndef __ZHICHIZUIXIAOHUA dwStyle = WS_OVERLAPPEDWINDOW | WS_VISIBLE; dwStyle &= ~WS_MAXIMIZEBOX; dwStyle &= ~WS_MINIMIZEBOX; dwStyle &= ~WS_SYSMENU; dwStyle &= ~WS_SIZEBOX; #else dwStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_VISIBLE; #endif //__ZHICHIZUIXIAOHUA } --------------------------------------------------------------------------------------------------------------------------- 搜索: bGotMsg = ( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) != 0 ); 修改如下: if( m_bActive ) { bGotMsg = ( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) != 0 ); } else { #ifndef __ZHICHIZUIXIAOHUA bGotMsg = ( GetMessage( &msg, NULL, 0U, 0U ) != 0 ); #else bGotMsg = ( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) != 0 ); g_dpLoginClient.Ping(); g_dpCertified.Ping(); g_DPlay.ReceiveMessage(); g_dpLoginClient.ReceiveMessage(); g_dpCertified.ReceiveMessage(); Sleep(1); #endif //__ZHICHIZUIXIAOHUA } ------------------------------------------------------------------------------------------------------------------------- Neuz文件夹 **************************** VersionCommon.h **************************** 添加这么个东西: #define __ZHICHIZUIXIAOHUA //游戏窗口是否支持最小化 [free][/free] |
|
100% |
5级·神之庇护
|
沙发#
发布于:2011-12-27 14:43
|
板凳#
发布于:2011-12-27 15:44
源码发表区有人发表了,免费的
|
|
地板#
发布于:2011-12-29 11:03
看看
|
|
4楼#
发布于:2012-01-01 14:39
有人发了免费的
|
|