home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / misc / 4296 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  2.8 KB

  1. Xref: sparky comp.os.ms-windows.programmer.misc:4296 comp.os.ms-windows.programmer.win32:2507 comp.windows.x:20310
  2. Path: sparky!uunet!ssiny!gnohmon
  3. From: gnohmon@ssiny.UUCP (Ralph Betza)
  4. Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32,comp.windows.ms.programmer,comp.windows.x
  5. Subject: Need help using win3 bitmaps
  6. Keywords: X
  7. Message-ID: <164@ssiny.UUCP>
  8. Date: 16 Dec 92 19:11:37 GMT
  9. Followup-To: comp.windows.ms.programmer
  10. Organization: Systems Strategies, Inc., NY, NY
  11. Lines: 62
  12.  
  13. I need to rewrite some X stuff for ms-windows ( WIN3 ), know nothing
  14. about ms-windows, and alas! there is no O'Reilly book for it --
  15. just this "SDK Reference".
  16.  
  17. I would like to find a reasonably small win3 program that uses
  18. ms-windows bitmaps as the subject of drawing routines and, later on,
  19. uses the bitmaps for writing to a window; said program to serve me
  20. as an example.
  21.  
  22. For a recent version of how this technique is done in the X Window
  23. System, see comp.sources.misc,
  24. v34i022:  xvertext - painting vertical text in an X Window, Part01/01
  25.  
  26. I have RTFMed, and believe all this is in TFM, but either the manual
  27. is poorly organized or my brain is too feeble; in either case, I
  28. feel the need for an example to make things clear.
  29.  
  30. There must be one in simtel20, but it isn't at all obvious to me
  31. which one I want.
  32.  
  33. ( I found and examined ntxlib.zip, but all such things are
  34. unimplemented there, nor are there any clues as to how it would be
  35. done. )
  36.  
  37. I have asked the Usenet Oracle, but He doesn't know, either :-)
  38.  
  39.  
  40.  
  41. The remainder of this message is merely a clarification of what I
  42. need to do, and how much I've already figured out.
  43.  
  44. In stage one, drawing to the pixmaps, the X code I am working with
  45. creates a pixmap of depth 1, and uses such calls as XDrawSegments,
  46. XDrawRectangle, XFillPolygon to draw into the pixmap.
  47.  
  48.     In ms-windows, drawing calls do not take a "Drawable" as a
  49.     parameter. This appears to be in some manner controlled by the
  50.     DC. Exactly what I need to call to set this up, I do not know.
  51.  
  52. In stage 2, using the pixmaps, the X code calls XSetStipple()
  53. XSetFillStyle( ... FillStippled : FillOpaqueStippled ),
  54. XSetTSOrigin(), and XFillRectangle() in order to draw the desired
  55. shape. By drawing the pixmap in this roundabout manner, two things
  56. are accomplished: (a) whatever else is there is not disturbed; and
  57. (b) the color is independent of what was done in stage 1.
  58.  
  59.     In ms-windows, this whole scheme is impossible. It seems that
  60.     the msw call corresponding to XSetStipple() would be
  61.     CreatePatternBrush(), but the size of the pattern
  62.     must be 8 by 8!!
  63.  
  64.     I think that the correct msw way to do this is with bitBlt(),
  65.     using just the right "rop2" code...
  66.  
  67.  
  68.  
  69.  
  70. ----Ralph Betza (FM),
  71.     uunet!ssiny!gnohmon
  72.  
  73. I! Hi'm a mtatng siugnaturei vir*ss. You cann~t reisth elping me  spre]d!
  74.     ( comp.sources.misc/volume32/sigvi )
  75.