コード例 #1
0
//-----------------------------------------------------------------------------
HRESULT CWndHelperWebBox::RestoreDeviceObjects( void )
{
	CHelperWebBox* pHelperWebBox = CHelperWebBox::GetInstance();

	if( pHelperWebBox && pHelperWebBox->GetDialogHandle() )
		::SendMessage( pHelperWebBox->GetDialogHandle(), WM_INITDIALOG, 0, 0 );

	return CWndNeuz::RestoreDeviceObjects();
}
コード例 #2
0
ファイル: HelperWebBox.cpp プロジェクト: iceberry/flyffsf
//-----------------------------------------------------------------------------
BOOL CALLBACK HelperWebDialogProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam )
{
	CHelperWebBox* pHelperWebBox = CHelperWebBox::GetInstance();

	int nHelperWebSizeX = CHelperWebBox::HELPER_WEB_SIZE_NORMAL_X;
	int nHelperWebSizeY = CHelperWebBox::HELPER_WEB_SIZE_NORMAL_Y;
	if( g_Option.m_nResWidth >= 1024 && g_Option.m_nResHeight >= 768 )
	{
		nHelperWebSizeX = CHelperWebBox::HELPER_WEB_SIZE_LARGE_X;
		nHelperWebSizeY = CHelperWebBox::HELPER_WEB_SIZE_LARGE_Y;
	}

	switch( Msg )
	{
	case WM_INITDIALOG:
		{
			CRect rcCenter( 0, 0, 0, 0 );
			GetWindowRect( pHelperWebBox->GetParentHandle(), &rcCenter );

			int xLeft = ( rcCenter.left + rcCenter.right ) / 2 - nHelperWebSizeX / 2;
			int yTop = ( rcCenter.top + rcCenter.bottom ) / 2 - nHelperWebSizeY / 2;

			DWORD CapH = 0;

			if( g_Neuz.IsWindow() == true )
				CapH = GetSystemMetrics( SM_CYCAPTION );
			else
				CapH = 9;

			if( g_Neuz.m_bFakeFullMode )
			{
				if( g_Option.m_bStartFullScreen )
					CapH = 5;
				else
					CapH = 20;				
			}

			SetWindowPos( hWnd, NULL, xLeft, yTop+CapH, nHelperWebSizeX, nHelperWebSizeY, SWP_NOZORDER | SWP_NOACTIVATE );
			break;
		}
	case WM_COMMAND:
		{
			switch( wParam )
			{
			case IDCANCEL:
				{
					ShowWindow( pHelperWebBox->GetDialogHandle(), SW_HIDE );
					break;
				}
			}
			break;
		}
	}
	return FALSE;
}