home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5375 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.6 KB  |  47 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!mcsun!inesc.inesc.pt!inesc!tac
  3. From: tac@rena.inesc.pt (Telmo A. Carmo)
  4. Subject: Drawing many different objects
  5. Message-ID: <TAC.93Jan26103859@rena.inesc.pt>
  6. Sender: usenet@inesc.pt (USENET News System)
  7. Nntp-Posting-Host: rena.inesc.pt
  8. Organization: INESC
  9. Distribution: comp.os.ms-windows.programmer.misc
  10. Date: Tue, 26 Jan 1993 10:38:59 GMT
  11. Lines: 34
  12.  
  13.  
  14.  
  15. Hello
  16.  
  17. I would like some advice on the following problem.
  18.  
  19. I need to draw may graphical objects, which use different 
  20. pens, brushes, fonts and bitmaps(used for custom brush patterns).
  21.  
  22. The objects can be created dynamically, so I don't now at start how many
  23. pen/brushes/*,  I will need.
  24.  
  25. Should I, Each time I need to draw, use the Paint DC or the dc from GetDC(hWnd)
  26. and create the pen/brush/* selected it to the dc, draw, and then deselect it?
  27.  
  28. What are the penalties of using allways GetDC() (instead of the Paint DC)
  29. even when processing PAINT events?
  30.  
  31. Would it be faster (since I need to draw many graphical objects) to draw
  32. first on a bitmap and then BitBlt it to the window?
  33.  
  34. Should I have lists of pre-created pens/brushes/* and each time I need to
  35. perform a graphic operation try to find on those lists the best matching
  36. pen/brush/* instead of creating it?
  37.  
  38.     Thanks for any info.
  39.  
  40. Telmo Carmo - tac@inesc.pt
  41.  
  42. --
  43. =============================================================================
  44. Telmo Carmo -- tac@inesc.pt           | 'Old programmers never die,
  45. Tel: +351-1-3100085 FAX: 351-1-525843 |  they just branch to another address'
  46. ==============================================================================
  47.