Пример #1
0
//---------------------------------------------------//
// MoveOnScrollBar
//---------------------------------------------------//
void MoveOnScrollBar(HWND hWndTV,RECT RectTV)
{	switch(GetmHpVarStruct()->AscensSens)
	{	case 1: // Up
		{	GetmHpVarStruct()->YnextPos=(int)(RectTV.top+6);
			GetmHpVarStruct()->XnextPos=(int)(RectTV.right-9);
			break;
		}
		case 2: // Down
		{	if(IsWndStyle(hWndTV,WS_HSCROLL)==WS_HSCROLL) GetmHpVarStruct()->YnextPos=(int)(RectTV.bottom-27);
			else GetmHpVarStruct()->YnextPos=(int)(RectTV.bottom-12);
			GetmHpVarStruct()->XnextPos=(int)(RectTV.right-11);
			break;
		}
		case 3: // Right
		{	GetmHpVarStruct()->YnextPos=(int)(RectTV.bottom-12);
			if(IsWndStyle(hWndTV,WS_VSCROLL)==WS_VSCROLL) GetmHpVarStruct()->XnextPos=(int)(RectTV.right-24);
			else GetmHpVarStruct()->XnextPos=(int)(RectTV.right-10);
			break;
		}
		case 4: // Left
		{	GetmHpVarStruct()->YnextPos=(int)(RectTV.bottom-12);
			GetmHpVarStruct()->XnextPos=(int)(RectTV.left+9);
			break;
		}
	}
}
Пример #2
0
void CWndNeuz::SetSizeMax()
{
	if( m_bFullMax )
	{
		if( m_nWinSize == WSIZE_WINDOW )
		{
			m_rectBackup = GetWindowRect(TRUE);
			CRect rect;
			CWndBase* pWndFull 
				= m_pWndRoot->FindFullWnd();
			if(pWndFull)
				rect = pWndFull->GetWindowRect(TRUE);
			//rect = pWndFull->GetLayoutRect( TRUE );
			else
				if(IsWndStyle(WBS_CHILD))
					rect = m_pParentWnd->GetClientRect(TRUE);
				else
				{
					//rect = m_pWndRoot->GetWindowRect();
					rect = m_pWndRoot->GetLayoutRect();
					//rect.left = rect.Width() - 200;
				}
				m_wndTitleBar.GetDlgItem( WTBID_MAX )->SetTitle( _T( "#" ) );
				m_bFullWnd = TRUE;
				m_nWinSize = WSIZE_MAX;
				SetWndRect(rect);
		}
	}
	else
	if( m_nWinSize == WSIZE_WINDOW )
	{
		m_rectBackup = GetWindowRect(TRUE);
		CRect rect;
		CWndBase* pWndFull 
			= m_pWndRoot->FindFullWnd();
		if(pWndFull)
			rect = pWndFull->GetWindowRect(TRUE);
		else
			if(IsWndStyle(WBS_CHILD))
				rect = m_pParentWnd->GetClientRect(TRUE);
			else
			{
				//rect = m_pWndRoot->GetWindowRect();
				rect = m_pWndRoot->GetLayoutRect();
				rect.left = rect.Width() - 200;
			}
			SetWndRect(rect);
			m_wndTitleBar.GetDlgItem( WTBID_MAX )->SetTitle( _T( "#" ) );
			AddWndStyle(WBS_MANAGER);
			m_bFullWnd = TRUE;
			m_nWinSize = 2;
	}
}
Пример #3
0
void CWndCredit::SetWndRect( CRect rectWnd, BOOL bOnSize )
{
	CRect rectOld = m_rectClient;
	m_rectWindow = rectWnd;
	m_rectClient = m_rectWindow;
	m_rectLayout = m_rectClient;
	if( IsWndRoot() == FALSE && !IsWndStyle( WBS_NOFRAME ) )
	{
		if( IsWndStyle( WBS_CAPTION ) == TRUE )
			m_rectClient.top += 17;
		m_rectClient.DeflateRect( 2, 2, 6, 8 );
		m_rectLayout = m_rectClient;
		m_rectLayout.DeflateRect( 8, 8 );	
	}
	if( bOnSize && ( rectOld.Width() != m_rectClient.Width() || rectOld.Height() != m_rectClient.Height() ) )
		OnSize( 0, m_rectClient.Width(), m_rectClient.Height() );
	MakeVertexBuffer();
}
Пример #4
0
void CWndNeuz::AdjustWndBase( D3DFORMAT d3dFormat )
{
	if( m_strTexture.IsEmpty() || IsVisible() == FALSE || IsWndStyle( WBS_NODRAWFRAME ) )
		return;

	if( m_bTile == FALSE )
	{
		SetTexture( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, m_strTexture ), TRUE );
		return;
	}
	CWndBase::AdjustWndBase( m_d3dFormat );
}
Пример #5
0
BOOL CWndNeuz::OnSetCursor( CWndBase* pWndBase, UINT nHitTest, UINT message )
{
	if( IsWndStyle( WBS_THICKFRAME ) && ( IsFullMax() == FALSE || m_nWinSize != WSIZE_MAX ) )
	{
		if( m_bLButtonDown == FALSE )
		{
			CPoint point = GetMousePoint();
			ClientToScreen( &point );
			CRect rectWindow = GetWindowRect( TRUE );
			point -= rectWindow.TopLeft();
			int nResizeDir = GetResizeDir( point );
			if( nResizeDir )
			{
				// 1 = top
				// 2 = bottom
				// 3 = left
				// 4 = right
				// 5 = topLeft
				// 6 = topRight
				// 7 = bottomLeft
				// 8 = bottomRigh;
				switch( nResizeDir )
				{
				case 1:
				case 2:
					SetMouseCursor( CUR_RESIZE_VERT );
					break;
				case 3:
				case 4:
					SetMouseCursor( CUR_RESIZE_HORI );
					break;
				case 5:
				case 8:
					SetMouseCursor( CUR_RESIZE_HV1 );
					break;
				case 6:
				case 7:
					SetMouseCursor( CUR_RESIZE_HV2 );
					break;
						
				}
			}
			else
				CWndBase::OnSetCursor( pWndBase, nHitTest, message );
		}
	}
	else
		CWndBase::OnSetCursor( pWndBase, nHitTest, message );

	return TRUE;
}
Пример #6
0
void CWndNeuz::OnInitialUpdate()
{
	CWndBase::OnInitialUpdate();
	
	m_rectBackup = m_rectWindow;

	int x = m_rectWindow.Width() / 2;
	int y = m_rectWindow.Height();// - 45;
	CSize size = CSize( 60, 25 );//m_pSprPack->GetAt(9)->GetSize();
//	//DWORD dwStyle,const RECT& rect,CWndBase* pParentWnd,UINT nID);
	if( IsWndStyle( WBS_CAPTION ) )
	{ 
		m_wndTitleBar.Create( WBS_CHILD | WBS_DOCKING | WBS_NODRAWFRAME | WBS_NOFRAME, CRect(0,0,0,0), this, 100000 );
		m_wndTitleBar.SetTitle( "f**k" );
		m_wndTitleBar.Replace(); 
	}
//	m_wndButton.Create("OK",0,CRect(0,0,0+size.cx,0+size.cy),this,IDOK);//,m_pSprPack,9);
//	m_wndClose.SetDefault(TRUE);

	LPWNDAPPLET lpWndApplet = m_resMng.GetAt ( GetWndId() );
	if( lpWndApplet )
	{
//#ifndef __NEWINTERFACE
//		lpWndApplet->bTile = FALSE;
//#endif
		SetTitle( lpWndApplet->strTitle );
		m_bTile = ( lpWndApplet->bTile != FALSE );
		m_strTexture = lpWndApplet->strTexture;
		m_d3dFormat = lpWndApplet->d3dFormat;

		for( int i = 0; i < lpWndApplet->ptrCtrlArray.GetSize(); i++ )
		{
			m_wndArrayTemp.Add(
				CreateControl( m_pApp->GetSafeHwnd(), (LPWNDCTRL)lpWndApplet->ptrCtrlArray.GetAt( i ) )
			);
		}
	}


//	SetFocus();
	//m_bWndTile = TRUE;
//	AdjustWndBase();
#if __VER >= 8	
#ifdef __DISABLE_GAMMA_WND
	if(g_Neuz.m_bStartFullscreen)
#endif
//	g_Neuz.Drv_SetGamma( g_Neuz.GetSafeHwnd(), g_Option.m_fGamma, g_Option.m_nOverBright, g_Option.m_fContrast );
#endif //__Y_GAMMA_CONTROL_8
}
Пример #7
0
void CWndNeuz::OnNonClientLButtonDblClk( UINT nFlags, CPoint point )
{
	if( IsWndStyle( WBS_MAXIMIZEBOX ) )
		OnChildNotify( WNM_CLICKED, WTBID_MAX, NULL );
}