home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.ms-windows.programmer.misc:4296 comp.os.ms-windows.programmer.win32:2507 comp.windows.x:20310
- Path: sparky!uunet!ssiny!gnohmon
- From: gnohmon@ssiny.UUCP (Ralph Betza)
- Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32,comp.windows.ms.programmer,comp.windows.x
- Subject: Need help using win3 bitmaps
- Keywords: X
- Message-ID: <164@ssiny.UUCP>
- Date: 16 Dec 92 19:11:37 GMT
- Followup-To: comp.windows.ms.programmer
- Organization: Systems Strategies, Inc., NY, NY
- Lines: 62
-
- I need to rewrite some X stuff for ms-windows ( WIN3 ), know nothing
- about ms-windows, and alas! there is no O'Reilly book for it --
- just this "SDK Reference".
-
- I would like to find a reasonably small win3 program that uses
- ms-windows bitmaps as the subject of drawing routines and, later on,
- uses the bitmaps for writing to a window; said program to serve me
- as an example.
-
- For a recent version of how this technique is done in the X Window
- System, see comp.sources.misc,
- v34i022: xvertext - painting vertical text in an X Window, Part01/01
-
- I have RTFMed, and believe all this is in TFM, but either the manual
- is poorly organized or my brain is too feeble; in either case, I
- feel the need for an example to make things clear.
-
- There must be one in simtel20, but it isn't at all obvious to me
- which one I want.
-
- ( I found and examined ntxlib.zip, but all such things are
- unimplemented there, nor are there any clues as to how it would be
- done. )
-
- I have asked the Usenet Oracle, but He doesn't know, either :-)
-
-
-
- The remainder of this message is merely a clarification of what I
- need to do, and how much I've already figured out.
-
- In stage one, drawing to the pixmaps, the X code I am working with
- creates a pixmap of depth 1, and uses such calls as XDrawSegments,
- XDrawRectangle, XFillPolygon to draw into the pixmap.
-
- In ms-windows, drawing calls do not take a "Drawable" as a
- parameter. This appears to be in some manner controlled by the
- DC. Exactly what I need to call to set this up, I do not know.
-
- In stage 2, using the pixmaps, the X code calls XSetStipple()
- XSetFillStyle( ... FillStippled : FillOpaqueStippled ),
- XSetTSOrigin(), and XFillRectangle() in order to draw the desired
- shape. By drawing the pixmap in this roundabout manner, two things
- are accomplished: (a) whatever else is there is not disturbed; and
- (b) the color is independent of what was done in stage 1.
-
- In ms-windows, this whole scheme is impossible. It seems that
- the msw call corresponding to XSetStipple() would be
- CreatePatternBrush(), but the size of the pattern
- must be 8 by 8!!
-
- I think that the correct msw way to do this is with bitBlt(),
- using just the right "rop2" code...
-
-
-
-
- ----Ralph Betza (FM),
- uunet!ssiny!gnohmon
-
- I! Hi'm a mtatng siugnaturei vir*ss. You cann~t reisth elping me spre]d!
- ( comp.sources.misc/volume32/sigvi )
-