Click here to Skip to main content
Click here to Skip to main content

Drawing with DirectDraw & GDI

, 24 May 2002
Rate this:
Please Sign up or sign in to vote.
Drawing Graphics fast with DirectDraw than with GDI

Sample Image - Drawing.jpg

Sample Image - Drawing1.jpg

Software required to build the project:

  1. Visual C++ 6.0
  2. Direct X 7.0 SDK

Software required to run the Demo:

  1. DirectX 7.0
  2. Windows 2000 or Win 9x
  3. The system color must be 32 bits


Drawing is a DLL to develop graphics software and games. You can use it to display standard image formats (BMP, Jpeg, Png, tiff...). Also you can draw normal graphics (line, circle, rectangle...) with it. Drawing has a trait that change the draw engine at any moment. You can draw something with DirectDraw or GDI, certainly DirectDraw is faster and better than GDI.

The code

Drawing DLL consists of the following classes:

  1. CCanvas
  2. CCanvasImpl
  3. CDDCanvasImpl
  4. CGDICanvasImpl
  5. NDDSCreen
  6. NDDSurface
  7. CMemDC

Drawing DLL class structure:

Sample Image - Drawing.jpg


When you use Drawing DLL, you can Create a CCanvas object and do your drawing work with it.

At last you use canvas.refresh() to draw the screen.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author


China China
No Biography provided

Comments and Discussions

QuestionI can't build Pinmemberdruscelli7-May-12 1:23 
GeneralMy vote of 5 Pinmembermanoj kumar choubey26-Feb-12 22:38 
QuestionHow to use this library for multiple display? Pinmemberapurv14612-Jan-12 1:20 
GeneralScrooling support on Zomm In Pinmembernix32119-Jul-06 9:29 
GeneralMemory Increase Problem Pinmemberspeedall7723-Apr-06 2:16 
GeneralRe: Memory Increase Problem Pinmemberspeedall7723-Apr-06 3:50 
QuestionHow about embedded? PinmemberMark C. Malburg24-Oct-05 4:22 
GeneralDraw Teeth Pinmemberwasseem8-Sep-05 7:54 
Generalcompile error Pinmemberbeavis7-Jul-05 21:54 
GeneralOverlay modus Pinmemberhelium6620-Aug-04 6:16 
GeneralCan't get a correct color Pinmembervisualobeje3-Jul-04 5:12 
Generalhelp me directdraw quesions Pinmembernorthwest18-Apr-04 3:38 
General"Memory leak" and solution Pinmemberyuanhonglinchina24-Mar-04 5:50 
GeneralRe: "Memory leak" and solution PinmemberAndrew Nemtsev6-Mar-06 22:28 
GeneralThanks a lot ! Pinsussmrskyok5-Mar-04 16:15 
GeneralRe: Thanks a lot ! Pinmembermrskyok5-Mar-04 16:24 
GeneralRe: Thanks a lot ! Pinsussmrskyok5-Mar-04 16:24 
Questionloading a JPEG image? Pinmemberpetray9-Jan-04 8:56 
GeneralDirectX 9.0 PinmemberChang Sen22-Dec-03 22:05 
GeneralOne suggestion PinmemberJeremy Kimball9-Dec-03 8:13 
GeneralDirectX vs GDI Pinmembervistra6-Jul-03 23:46 
GeneralIt's what i need to write code,thanks! PinmemberICanFly8-Jan-03 21:45 
GeneralRe: It's what i need to write code,thanks! Pinmembermarb8-Jan-03 22:42 
GeneralRe: It's what i need to write code,thanks! PinmemberICanFly9-Jan-03 2:56 
GeneralPolyline and Polygon PinmemberPaul Selormey1-Aug-02 16:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141223.1 | Last Updated 25 May 2002
Article Copyright 2002 by marb
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid