Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How To Create a Transparent Pen?

How To Create a Transparent Pen?

Scheduled Pinned Locked Moved C / C++ / MFC
graphicshelptutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pritamkd
    wrote on last edited by
    #1

    Hi, I am developing a marker application. Basically allows free-hand drawing with the mouse. When i draw a line, i want the window below also to visible. I am not able to create a transparent Pen for this? i tried BS_HOLLOW, but it doesn't draw at all. hdc = CreateDC(TEXT("DISPLAY"),NULL,NULL,NULL); lb.lbColor = rgbCurrent; lb.lbHatch = NULL; lb.lbStyle = BS_SOLID; //hNewPen = CreatePen(PS_SOLID,10,rgbCurrent); //SetROP2(hdc,R2_MERGEPEN); hNewPen = ExtCreatePen(PS_GEOMETRIC,10,&lb,0,NULL); //SelectObject(hdc,CreateBrushIndirect(&lb)); //SetDCBrushColor(hdc,rgbCurrent); SelectObject(hdc,hNewPen); MoveToEx(hdc, PrevX, PrevY, NULL); LineTo(hdc, CurrX, CurrY); DeleteDC(hdc); ........ Can anyone help? Hercules

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups