本文整理汇总了C++中CFirstPersonCamera::HandleMessages方法的典型用法代码示例。如果您正苦于以下问题:C++ CFirstPersonCamera::HandleMessages方法的具体用法?C++ CFirstPersonCamera::HandleMessages怎么用?C++ CFirstPersonCamera::HandleMessages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFirstPersonCamera
的用法示例。
在下文中一共展示了CFirstPersonCamera::HandleMessages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MsgProc
//--------------------------------------------------------------------------------------
// Handle messages to the application
//--------------------------------------------------------------------------------------
LRESULT CALLBACK MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool* pbNoFurtherProcessing,
void* pUserContext )
{
UNREFERENCED_PARAMETER(pUserContext);
// Pass messages to dialog resource manager calls so GUI state is updated correctly
*pbNoFurtherProcessing = g_DialogResourceManager.MsgProc( hWnd, uMsg, wParam, lParam );
if( *pbNoFurtherProcessing )
return 0;
// Pass messages to settings dialog if its active
if( g_D3DSettingsDlg.IsActive() )
{
g_D3DSettingsDlg.MsgProc( hWnd, uMsg, wParam, lParam );
return 0;
}
// Give the dialogs a chance to handle the message first
*pbNoFurtherProcessing = g_HUD.MsgProc( hWnd, uMsg, wParam, lParam );
if( *pbNoFurtherProcessing )
return 0;
*pbNoFurtherProcessing = g_SampleUI.MsgProc( hWnd, uMsg, wParam, lParam );
if( *pbNoFurtherProcessing )
return 0;
// Pass all remaining windows messages to camera so it can respond to user input
g_ViewerCamera.HandleMessages( hWnd, uMsg, wParam, lParam );
return 0;
}
示例2: MsgProc
//--------------------------------------------------------------------------------------
// Handle messages to the application
//--------------------------------------------------------------------------------------
LRESULT CALLBACK MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
bool* pbNoFurtherProcessing, void* pUserContext )
{
// Pass all remaining windows messages to camera so it can respond to user input
g_Camera.HandleMessages( hWnd, uMsg, wParam, lParam );
switch( uMsg )
{
case WM_LBUTTONDOWN:
case WM_LBUTTONDBLCLK:
g_bLeftMouseDown = true;
break;
case WM_LBUTTONUP:
g_bLeftMouseDown = false;
break;
case WM_CAPTURECHANGED:
if( (HWND)lParam != hWnd )
g_bLeftMouseDown = false;
break;
}
return MyAppMsgProc(hWnd, uMsg, wParam, lParam,
pbNoFurtherProcessing, pUserContext);
}
示例3: MsgProc
//--------------------------------------------------------------------------------------
// Handle messages to the application
//--------------------------------------------------------------------------------------
LRESULT CALLBACK MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
bool* pbNoFurtherProcessing, void* pUserContext)
{
// Always allow dialog resource manager calls to handle global messages
// so GUI state is updated correctly
*pbNoFurtherProcessing = g_DialogResourceManager.MsgProc(hWnd, uMsg, wParam, lParam);
if (*pbNoFurtherProcessing)
{
return 0;
}
if (g_SettingsDlg.IsActive())
{
g_SettingsDlg.MsgProc(hWnd, uMsg, wParam, lParam);
return 0;
}
// Give the dialogs a chance to handle the message first
*pbNoFurtherProcessing = g_HUD.MsgProc(hWnd, uMsg, wParam, lParam);
if (*pbNoFurtherProcessing)
{
return 0;
}
// Pass all windows messages to camera so it can respond to user input
if (g_UseOrbitalCamera)
{
g_OrbitalCamera.HandleMessages(hWnd, uMsg, wParam, lParam);
}
else
{
g_FirstPersonCamera.HandleMessages(hWnd, uMsg, wParam, lParam);
}
return 0;
}