With The Case Of  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
ActiveX COM Products
Technical Support
  General Q & A
Discussion Board
Contact Us


Get Ready to Unleash the Power of UCanCode .NET

UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"

VC++ MFC Tutorial: GDI Objects


1.Device Context and GDI Objects

2.VC++ MFC GDI Tutorial: CDC, FromHandle, CreateDC, DeleteDC

3.VC++ MFC Tutorial: GDI, Paint, CPaintDC, OnPaint, WM_PAINT

4.VC++ MFC Tutorial: OnPrepareDC, LPtoDP, GetDC

5.VC++ MFC Tutorial: GDI, CWindowDC, GetWindowDC, ReleaseDC, 

6.VC++ MFC Tutorial: GDI, Metafile, m_hAttribDC, CreateEnhanced, CopyMetaFile, Free Source Code Download

7.VC++ MFC Tutorial: GDI, CDC, R2_NOTCOPYPEN, R2_XORPEN, SetROP2, SetPolyFillMode, Free Source Code Downloads

8.VC++ MFC Tutorial: GDI,SetMapMode,Coordinate,MM_TEXT,MM_TWIPS,SetWindowOrg,SetViewportOrg,  Free Source Code Download

9.VC++ MFC Tutorial: GDI,Coordinate,map,DPtoLP,LPtoDP,SetWorldTransform,  Free Source Code Download

10.VC++ MFC Tutorial: FillRect,RillRgn,FrameRgn,InvertRgn,DrawIcon,DrawDragRect, Free Source Code download

11.VC++ MFC Tutorial: SelectObject, SaveDC, SelectClipRgn,Free Source Code Download

12.VC++ MFC Tutorial: CDC,GetCurrentPosition,SetArcDirection,Polyline,RoundRect,Chord,PolyPolygon, Free Source Code Download

13.VC++ MFC Tutorial: CDC,ExtTextOut,GetOutputTextExtent,SetTextAlign,StretchBlt,SetStretchMode,TabbedTextOut,  Free Source Code Download

14.VC++ MFC Tutorial: GDI,Drawing,CGdiObject,CreateStockObject,DeleteObject,CreatePenIndirect, Free Source Code Download

15.VC++ MFC Tutorial: GDI,LoadOEMBitmap,SetBitmapBits,CreateBitmapIndirect,HBITMAP,  Free Source Code Download

16.VC++ MFC Tutorial: GDI,CFont,CreateFontIndirect,CreatePointFont,LOGFONT,  Free Source Code Download

17.VC++ MFC Tutorial: GDI,CPalette,CreatePalette,CreateHalftonePalette,HPALETTE,  Free Source Code Download

18.VC++ MFC Tutorial: GDI,CRgn,CreateRectRgn,CreateEllipticRgn,CreatePolygonRgn,CombineRgn,RectInRegion,Free Source Code Download

19.VC++ MFC Tutorial: GDI, OLE Control

VC++ Article Draw Rotate / slant text strings SetWorldTransform

VC++ Code: Drag and Drop File in Dialog with WM_DROPFILES and WM_NCLBUTTONDOWN


MFC Article: Create toolbar with SetButtons and SetButtonInfo and OnNotify

Draw or Paint Spline Curve Line with VC++ Source Code

MFC Sample Code: Load and Display PNG Image File

GDI+ Example:  Draw Curve ActiveX Control GraphicsPath and Graphics

MFC MDI and SDI Example to create ruler scrollview and splitter

VC++ MFC Codes: Display Message Balloon Tip Window with SetWindowRgn and CreateRectRgn and CombineRgn

Store and read from XML File with .NET and C# framework, C++/MFC Example

MFC Library Article: Create Database with SQL Server and ADO Stored Procedures

VC++ Article: Draw Image Background and CScrollView text with bitmap brush and PreCreateWindow

MFC visualisation software: Create and draw Thumbnail View with CWinApp and CDocTemplate and CMultiDocTemplate

VC++ Example: Draw or display Real-time data plot Chart

SCADA Automation Programming Tool And visualization component Control VC++ Source Code Solution

Visual C++ and MFC Appwizard: CMDIChildWnd with CenterWindow AfxGetMainWnd

Visual C++ 2008 Feature Pack: MFC Visual Studio Office 2007 Style Enhancements

Open Souce VC++ Code  and MFC Code Site, VC++ FAQ Site and Tutorial Site

VC++ Example: Load or Save Dib Bitmap File, GetScrollPosition and FillRgn or CombineRgn and Create Cursor

OLE DB Sample, Database, Atldbcli.h,CoInitialize, MoveNext Visual C++ Example

Day, week, month calendar control with vc++ source code,MS OutLook Look

CDialogBar, CBitmapButton in Dialog Bar, SubclassDlgItem and EnableDocking VC++ Example

Create Multiple Language to MFC Extension DLL Toolkit with Resource only

VC++ Example and Article: Drawing Double Buffering With GDI+

VC++ Sample: Multiple Views layout of RepositionBars and DeferWindowPos with RecalcLayout and UpdateAllViews

VC++ MFC Example: Adding VBScript and JScript support in your C++ applications

Visual C++ Example: Load DIB Bitmap File and Save Bitmap file and Convert dib to bitmap and rotate bitmap file

Free VC++ MFC Grid Control with VC++ Source Code

VC++ Ado Tutorial with VC++ Ado Sample and VC++ Ado Example

MFC Example: CreateFile and WriteFile with save memory dc to bitmap file

MFC Source Code: WindowFromPoint and GetDlgItem or ScreenToClient

E-XD++ GDI VC++ Drawing Example: Draw Animate Line with CBrush

MFC Example Multiple monitor support with GetSystemMetrics EnumDisplayMonitors and GetMonitorInfo

MFC Sample: Add status bar to an MFC dialog, CStatusBar

Draw Rotate Text with GetTextExtent and SetTextAlign and ExtTextOut, VC++ Example

VC++ Codes: Draw text along line and draw rotate text

VC++ Example CFilterEdit Regular Expression : Use Regular Expression to Filter Your Input, Boost C++ Library

Create VC++ MFC Chart Control,  Drawing and Priint Bar Chart, Source Codes

VC++ Example: splitter control in dialog UpdateWindow GetWindowRect GetDlgItem

MFC GDI+ Sample: gdiplus.lib with GdiplusStartupInput and GdiplusStartup with GdiplusShutdown

VC++ Example: Add VBScript and JScript support in VC++ applications with Script ActiveX Control MSSCRIPT.OCX

Add Phthon in or into C++ Application with Visual C++ Article or Tutorial Source Code

MFC Example: Create Multiple Thread with CreateThread and CWinThread and SuspendThread and ResumeThread

MFC Library: Drawing Spline application with OpenGL with sample Source Code

Introduction to GDI+ in .NET

GDI+ Font, Brush and Bitmap

GDI+ GraphicsPath and LinearGradientBrush

GDI+ Printing.

GDI+ and DrawArc and DrawPath

GDI+ Color and ARGB with Example

Context and GDI Objects

Drawing and graphics has special significance in almost every Windows application; MFC applications are no exception to this rule.

The Windows Graphics Device Interface (GDI) capabilities are encapsulated in two families of MFC classes. Device context classes provide an encapsulation of GDI device contexts and most drawing functions; GDI object classes encapsulate GDI objects such as pens, brushes, bitmaps, or fonts.

As in non-MFC Windows applications, drawing to an output device consists of obtaining the appropriate device context, setting up GDI drawing objects, performing drawing operations, and cleaning up. The MFC framework greatly simplifies these steps by assuming many of the more mundane responsibilities that used to befall on the application developer. For example, you can construct a pen object by passing the appropriate parameters to the Cpen constructor function:

Cpen myPen(PS_SOLID, 0, RGB(255, 0, 0));

and never worry about it afterwards; the GDI pen object is destroyed automatically by the Cpen destructor when the Cpen object goes out of scope.

As is the case with windows and CWnd objects, there is a distinction between the MFC (CDC- or CGdiObject-derived) object and the actual device context or GDI object in Windows. Constructing the MFC object does not automatically imply construction of an underlying Windows object. On the contrary, it is a legitimate practice to construct a blank MFC object first and later associate it with the Windows object as the need arises.

In this chapter, we first focus our attention on device contexts, which serve as the "canvas" onto which drawing takes place. Actual drawing operations (functions such as Rectangle, Ellipse, or DrawText) are also encapsulated in the CDC class and are discussed here. In the second part of this chapter, we shift our focus to classes that encapsulate GDI objects, which represent drawing tools.

MFC Example, and free VC++ Source Code Download

Using GDI+ with MFC or native C/VC++

VC++ Example Capture Print Screen to Clipboard including dropdown menu, SetWindowsHookEx and UnhookWindowsHookEx, with RegisterWindowMessage

CAM simulator Sample with VC++ MFC Source Code

Full Screen with CWnd and Diagram Like Microsoft Visio 2007


UCanCode Advance E-XD++ CAD Drawing and Printing Solution Source Code Solution for C/C++, .NET V2022 is released!

Contact UCanCode Software

To buy the source code or learn more about with:




Copyright ?1998-2022 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to