1+ using System ;
2+ using System . Runtime . InteropServices ;
3+ using SmartSystemMenu . Native . Enums ;
4+
5+ namespace SmartSystemMenu . Native
6+ {
7+ static class Gdi32
8+ {
9+ [ DllImport ( "gdi32.dll" , EntryPoint = "CreateCompatibleDC" , SetLastError = true ) ]
10+ public static extern IntPtr CreateCompatibleDC ( [ In ] IntPtr hdc ) ;
11+
12+ [ DllImport ( "gdi32.dll" , EntryPoint = "SelectObject" ) ]
13+ public static extern IntPtr SelectObject ( [ In ] IntPtr hdc , [ In ] IntPtr hgdiobj ) ;
14+
15+ [ DllImport ( "gdi32.dll" , EntryPoint = "BitBlt" , SetLastError = true ) ]
16+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
17+ public static extern bool BitBlt ( [ In ] IntPtr hdc , int nXDest , int nYDest , int nWidth , int nHeight , [ In ] IntPtr hdcSrc , int nXSrc , int nYSrc , CopyPixelOperations dwRop ) ;
18+
19+ [ DllImport ( "gdi32.dll" , EntryPoint = "StretchBlt" , SetLastError = true ) ]
20+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
21+ public static extern bool StretchBlt ( [ In ] IntPtr hdc , int nXDest , int nYDest , int nWidthDest , int nHeightDest , [ In ] IntPtr hdcSrc , int nXSrc , int nYSrc , int nWidthSource , int nHeightSource , CopyPixelOperations dwRop ) ;
22+
23+ [ DllImport ( "gdi32.dll" ) ]
24+ public static extern IntPtr CreateDIBSection ( IntPtr hdc , [ In ] ref IntPtr pbmi , uint pila , out IntPtr ppvBits , IntPtr hSection , uint dwOffset ) ;
25+
26+ [ DllImport ( "gdi32.dll" , EntryPoint = "DeleteDC" ) ]
27+ public static extern bool DeleteDC ( [ In ] IntPtr hdc ) ;
28+
29+ [ DllImport ( "gdi32.dll" ) ]
30+ public static extern int GetObject ( IntPtr hgdiobj , int cbBuffer , IntPtr lpvObject ) ;
31+
32+ [ DllImport ( "gdi32.dll" , EntryPoint = "DeleteObject" ) ]
33+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
34+ public static extern bool DeleteObject ( [ In ] IntPtr hObject ) ;
35+
36+ [ DllImport ( "gdi32.dll" ) ]
37+ public static extern IntPtr CreateCompatibleBitmap ( IntPtr hdc , int nWidth , int nHeight ) ;
38+
39+ [ DllImport ( "gdi32.dll" ) ]
40+ internal static extern int GetDeviceCaps ( IntPtr hdc , int capindex ) ;
41+
42+ [ DllImport ( "gdi32.dll" ) ]
43+ internal static extern bool PatBlt ( IntPtr hdc , int nXLeft , int nYLeft , int nWidth , int nHeight , uint dwRop ) ;
44+ }
45+ }
0 commit comments