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
  1. Home
  2. Mobile Development
  3. Mobile
  4. CreatePolyRgn

CreatePolyRgn

Scheduled Pinned Locked Moved Mobile
question
2 Posts 2 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.
  • R Offline
    R Offline
    Rassul Yunussov
    wrote on last edited by
    #1

    What about this function??? I would like to create a filled triangle. But i can't call the function Create PolyRgn.

    B 1 Reply Last reply
    0
    • R Rassul Yunussov

      What about this function??? I would like to create a filled triangle. But i can't call the function Create PolyRgn.

      B Offline
      B Offline
      Bui Huy Kien
      wrote on last edited by
      #2

      Hi Rassul Yunussov, To draw a polygon. First, you must create an array of vertices for your polygon. And then call the Polygon function with two parameters: One is the array, and one is the number of vertices you want to draw. Here is the example to draw a filled triangle using Polygon function: CBrush brushRed(RGB(255, 0, 0)); CBrush* pOriginBrush= pDC->SelectObject(&brushRed); CPoint pts[3]; pts[0].x = 1; pts[0].y = 1; pts[1].x = 1; pts[1].y = 100; pts[2].x = 100; pts[2].y = 100; pDC->Polygon(pts, 3); pDC->SelectObject(pOriginBrush); Regards, -Kien Bui

      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