Author Topic: Demo of ROP2 operators  (Read 502 times)

NoCforMe

  • Member
  • ****
  • Posts: 855
Demo of ROP2 operators
« on: July 20, 2022, 11:25:40 AM »
Wrote a little ditty ("song" for non-English spkrs. here) in the form of a Win32 program that demonstrates what all the rop2 parameters of the SetROP2() function actually do. (I did this because of my own ignorance in this area. Nothing like a picture to beat 10K words!)

Try changing colors and see what happens. Looks to me like R2_NOTXORPEN is the mode you'd want to use if you want to draw something, say a window border, and then erase it back to the original screen colors by redrawing the same thing over it.

This li'l program demonstrates my dumbass "fake dialog" method where you just create everything by hand (AKA "resource compiler? what's that?"). Thank heavens for WinSpy++ to tweak and adjust things to fit.

Lessons learnt here:
  • Using SetROP2(), natch
  • Creating "geometric" pens (rather than simpler "cosmetic" ones) using ExtCreatePen()

daydreamer

  • Member
  • *****
  • Posts: 2196
  • my kind of REAL10 Blonde
Re: Demo of ROP2 operators
« Reply #1 on: July 21, 2022, 05:45:26 PM »
 :thumbsup:
works on win10
my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."

mikeburr

  • Member
  • **
  • Posts: 184
Re: Demo of ROP2 operators
« Reply #2 on: July 28, 2022, 09:15:53 PM »
works on Wine 32 bit too .. didnt check every option but did check a few.. very good well done
regards mikeb

FORTRANS

  • Member
  • *****
  • Posts: 1215
Re: Demo of ROP2 operators
« Reply #3 on: July 30, 2022, 06:06:33 AM »
Hi,

   Seems to work with Windows 2000.

Cheers,

Steve N.

rsala

  • Member
  • ***
  • Posts: 353
    • Easy Code
Re: Demo of ROP2 operators
« Reply #4 on: July 30, 2022, 09:10:45 PM »
 :thumbsup:
Works on win11
EC coder

NoCforMe

  • Member
  • ****
  • Posts: 855
Re: Demo of ROP2 operators
« Reply #5 on: July 31, 2022, 11:11:42 AM »
:thumbsup:
Works on win11

No reason it shouldn't. Everything in there is legacy stuff that Micro$oft will support until the end of time.

rsala

  • Member
  • ***
  • Posts: 353
    • Easy Code
Re: Demo of ROP2 operators
« Reply #6 on: July 31, 2022, 08:51:48 PM »
Yes, that's right, and the same is applicable to Win8/8.1/10.
EC coder