google-site-verification: googlebaca44933768a824.html GUI crap - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

GUI crap

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GUI crap

    Thats how I show the Windows cursor and block the mouse for my GUI

    Code:
    //=========================================================================================
    PBYTE g_pbShowCursor;
    //=========================================================================================
    void __fastcall new_LockCursor ( PDWORD pdwECX )
    {
    	if ( g_pbShowCursor == NULL )
    	{
    		DWORD dwShowCursor;
    
    		dwShowCursor = ( ( DWORD )_LockCursor + 0x2 );
    
    		g_pbShowCursor = ( PBYTE )( *( PDWORD )( dwGetCallAddress ( dwShowCursor ) + 0x20 ) );
    	}
    
    	if ( g_bGUIActive )
    	{
    		*g_pbShowCursor = 1;
    
    		( ( ISurface* )pdwECX )->UnlockCursor();
    	}
    	else
    	{
    		*g_pbShowCursor = 0;
    
    		_LockCursor ( pdwECX );
    	}
    }
    //=========================================================================================

    #2
    Re: GUI crap

    g_pSurface->SetCursorAlwaysVisible(bool);
    g_pSurface->UnlockCursor();
    g_pSurface->LockCursor();

    Comment

    Working...
    X