Despite the control source code, but I am pretty good, have not learned c + +, had to come for help, hope bosses to resolve,
Is the control:
Source: https://download.csdn.net/download/Learn_change_myself/13025712
CodePudding user response:
Sweat, upload resources need to be review, need some time to open the source link,CodePudding user response:
Can't see the code, GDI didn't release bai, this should be good lookingCodePudding user response:
Operations on Graphic ObjectsAfter an application creates a display or a printer device context, it can begin drawing on the associated device or, in the case of the memory device context, it can begin drawing on the bitmap stored in the memory. The clear, before drawing begins and sometimes while drawing is in progress, it is, necessary to replace the default objects with new objects.
An application can examine a default object 's attributes by calling the GetCurrentObject and GetObject functions provides. The GetCurrentObject function returns a handle identifying the current pen and brush, the palette, bitmap, or the font, and the GetObject function initializes a structure containing that object' s attributes.
Some printers dojo.provide resident pens, brushes, and fonts that can be 2 improve drawing speed in an application. The Two functions provides can be 2 enumerate these objects: EnumObjects and EnumFontFamilies. If the application must enumerate resident pens or brushes, it can call the EnumObjects function to examine the corresponding attributes. If the application must enumerate resident fonts, it can call the EnumFontFamilies function (which can also enumerate the GDI fonts).
Once an application determines that a default object needs replacing, it creates a new object by calling one of the following creation functions provides.
Graphics Object Function
Bitmap CreateBitmap, CreateBitmapIndirect, CreateCompatibleBitmap CreateDiscardableBitmap, CreateDIBitmap
Brush CreateBrushIndirect CreateDIBPatternBrush, CreateDIBPatternBrushPt CreateHatchBrush, CreatePatternBrush, CreateSolidBrush
Color Palette CreatePalette
The Font CreateFont, CreateFontIndirect
Pen CreatePen CreatePenIndirect, ExtCreatePen
Region CreateEllipticRgn CreateEllipticRgnIndirect, CreatePolygonRgn CreatePolyPolygonRgn, CreateRectRgn, CreateRectRgnIndirect, CreateRoundRectRgn
Each of these functions returns a handle identifying a new object. After an application retrieves a handle, it must call the SelectObject function to replace the default object. However, the application should save the handle identifying the default object and use this handle to replace the new object when it is no longer needed. When the application finishes drawing with the new object, it must restore the default object by calling the SelectObject function and delete the new object by calling the DeleteObject function. Failing to delete objects causes serious performance problems.
CodePudding user response:
The