阅读:3085回复:5
给《飞飞》添加最小化功能
_DirectX文件夹d3dapp.cpp文件[font=Arial, ]------------------------------------------------------------------------------------------------------------
*************************** 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 //游戏窗口是否支持最小化 |
|
最新喜欢:liulin... |
沙发#
发布于:2019-12-30 09:47
|
|
板凳#
发布于:2022-07-27 22:38
__ZHICHIZUIXIAOHUA
|
|
4楼#
发布于:2023-01-12 10:59
开奖网结果
1688 168won福彩3D稳赚方法 的生理现象与病理现象的过程中所发展出来的一门医学体系。文艺复兴以后,西方医学开始了由经验医学向实验医学的转变。17世纪实验、量度的应用,使生命科学开始步入科学轨道,其标志是哈维发现血液循环。随着实验的兴起,出现了许多科学仪器 显微镜就是其中之一,显微镜把人们带到一个新的认识水平。18世纪莫干尼把对疾病的认识由症状推到了器官,建立了病理解剖学,为研究疾病的生物学原因开辟了道路,此外,牛痘接种的发明,公共卫生和社会医学的一些问题引起人们的重视。 |
|
5楼#
发布于:2023-12-16 08:45
为了一个铜币努力177928796
|
|