Skip to content

Instantly share code, notes, and snippets.

@LaraSQP
Created September 22, 2021 21:24
Show Gist options
  • Save LaraSQP/a466f5f5e1c7fad78ce87267d9b4ee74 to your computer and use it in GitHub Desktop.
Save LaraSQP/a466f5f5e1c7fad78ce87267d9b4ee74 to your computer and use it in GitHub Desktop.
private const int TCM_FIRST = 0x1300;
private const int TCM_SETPADDING = TCM_FIRST + 43;
private const int PADDING_X = 24;
private const int PADDING_Y = 2;
protected override void WndProc( ref Message m )
{
if( m.Msg == TCM_SETPADDING )
{
// The vertical padding is the high-order word and the horizontal the low-order word of the lParam
m.LParam = new IntPtr( ( PADDING_Y << 16 ) | ( PADDING_X & 0xFFFF ) );
}
base.WndProc( ref m );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment