Click here to Skip to main content
Licence 
First Posted 24 May 2002
Views 210,878
Bookmarked 57 times

Drawing with DirectDraw & GDI

By | 24 May 2002 | Article
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

Introduction

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

Note

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.

License

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

marb



China China

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionI can't build Pinmemberdruscelli0:23 7 May '12  
GeneralMy vote of 5 Pinmembermanoj kumar choubey21:38 26 Feb '12  
QuestionHow to use this library for multiple display? Pinmemberapurv1460:20 12 Jan '12  
GeneralScrooling support on Zomm In Pinmembernix3218:29 19 Jul '06  
GeneralMemory Increase Problem Pinmemberspeedall771:16 23 Apr '06  
GeneralRe: Memory Increase Problem Pinmemberspeedall772:50 23 Apr '06  
QuestionHow about embedded? PinmemberMark C. Malburg3:22 24 Oct '05  
GeneralDraw Teeth Pinmemberwasseem6:54 8 Sep '05  
Generalcompile error Pinmemberbeavis20:54 7 Jul '05  
GeneralOverlay modus Pinmemberhelium665:16 20 Aug '04  
GeneralCan't get a correct color Pinmembervisualobeje4:12 3 Jul '04  
Generalhelp me directdraw quesions Pinmembernorthwest2:38 18 Apr '04  
General"Memory leak" and solution Pinmemberyuanhonglinchina4:50 24 Mar '04  
GeneralRe: "Memory leak" and solution PinmemberAndrew Nemtsev21:28 6 Mar '06  
GeneralThanks a lot ! Pinsussmrskyok15:15 5 Mar '04  
GeneralRe: Thanks a lot ! Pinmembermrskyok15:24 5 Mar '04  
GeneralRe: Thanks a lot ! Pinsussmrskyok15:24 5 Mar '04  
Questionloading a JPEG image? Pinmemberpetray7:56 9 Jan '04  
GeneralDirectX 9.0 PinmemberChang Sen21:05 22 Dec '03  
GeneralOne suggestion PinmemberJeremy Kimball7:13 9 Dec '03  
GeneralDirectX vs GDI Pinmembervistra22:46 6 Jul '03  
GeneralIt's what i need to write code,thanks! PinmemberICanFly20:45 8 Jan '03  
GeneralRe: It's what i need to write code,thanks! Pinmembermarb21:42 8 Jan '03  
GeneralRe: It's what i need to write code,thanks! PinmemberICanFly1:56 9 Jan '03  
GeneralPolyline and Polygon PinmemberPaul Selormey15:48 1 Aug '02  

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.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 25 May 2002
Article Copyright 2002 by marb
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid