@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetStockObject function retrieves a handle to one of the stock pens, brushes, fonts, or palettes. !!!!C# Signature: [DllImport("gdi32.dll")] static extern IntPtr GetStockObject(StockObjects fnObject); !!!!VB.NET Signature: <DllImport("gdi32.dll")> _ Private Shared Function GetStockObject(fnObject As StockObjects) As IntPtr End Function !!!!User-Defined Types C#: public enum StockObjects { WHITE_BRUSH = 0, LTGRAY_BRUSH = 1, GRAY_BRUSH = 2, DKGRAY_BRUSH = 3, BLACK_BRUSH = 4, NULL_BRUSH = 5, HOLLOW_BRUSH = NULL_BRUSH, WHITE_PEN = 6, BLACK_PEN = 7, NULL_PEN = 8, OEM_FIXED_FONT = 10, ANSI_FIXED_FONT = 11, ANSI_VAR_FONT = 12, SYSTEM_FONT = 13, DEVICE_DEFAULT_FONT = 14, DEFAULT_PALETTE = 15, SYSTEM_FIXED_FONT = 16, DEFAULT_GUI_FONT = 17, DC_BRUSH = 18, DC_PEN = 19, } !!!!User-Defined Types VB.NET: Public Enum StockObjects WHITE_BRUSH = 0 LTGRAY_BRUSH = 1 GRAY_BRUSH = 2 DKGRAY_BRUSH = 3 BLACK_BRUSH = 4 NULL_BRUSH = 5 HOLLOW_BRUSH = NULL_BRUSH WHITE_PEN = 6 BLACK_PEN = 7 NULL_PEN = 8 OEM_FIXED_FONT = 10 ANSI_FIXED_FONT = 11 ANSI_VAR_FONT = 12 SYSTEM_FONT = 13 DEVICE_DEFAULT_FONT = 14 DEFAULT_PALETTE = 15 SYSTEM_FIXED_FONT = 16 DEFAULT_GUI_FONT = 17 DC_BRUSH = 18 DC_PEN = 19 End Enum !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: Please add some! !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: GetStockObject@msdn on MSDN
Edit gdi32.GetStockObject
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.