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. General Programming
  3. Graphics
  4. GDI+ Region::IsVisible()

GDI+ Region::IsVisible()

Scheduled Pinned Locked Moved Graphics
graphicswinformscollaborationquestioncareer
5 Posts 2 Posters 7 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.
  • M Offline
    M Offline
    Mark Salsbery
    wrote on last edited by
    #1

    This is a repost from the MS GDI newsgroup. Does anyone know why, in the following code, does the IsVisible() call return true? Mark

    Rect gdiText(507, 636, 6, 7);
    Rect rctOne(512, 684, 20, 17);
    Rect rctTwo(652, 220, 47, 9);

    Region gdiRegion;
    gdiRegion.MakeEmpty();

    gdiRegion.Union(rctOne);
    gdiRegion.Union(rctTwo);

    gdiRegion.IsVisible(gdiText);

    // Uncomment this code to draw the region in a window
    // Graphics DstGraphics(*this);
    // SolidBrush blueBrush(Color(255, 0, 0, 255));
    // SolidBrush greenBrush(Color(255, 0, 255, 0));
    //
    // // Draw the region
    // DstGraphics.FillRegion(&blueBrush, &gdiRegion);
    //
    // // Draw the hit test rect
    // gdiRegion.MakeEmpty();
    // gdiRegion.Union(gdiText);
    // DstGraphics.FillRegion(&greenBrush, &gdiRegion);

    "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

    C 1 Reply Last reply
    0
    • M Mark Salsbery

      This is a repost from the MS GDI newsgroup. Does anyone know why, in the following code, does the IsVisible() call return true? Mark

      Rect gdiText(507, 636, 6, 7);
      Rect rctOne(512, 684, 20, 17);
      Rect rctTwo(652, 220, 47, 9);

      Region gdiRegion;
      gdiRegion.MakeEmpty();

      gdiRegion.Union(rctOne);
      gdiRegion.Union(rctTwo);

      gdiRegion.IsVisible(gdiText);

      // Uncomment this code to draw the region in a window
      // Graphics DstGraphics(*this);
      // SolidBrush blueBrush(Color(255, 0, 0, 255));
      // SolidBrush greenBrush(Color(255, 0, 255, 0));
      //
      // // Draw the region
      // DstGraphics.FillRegion(&blueBrush, &gdiRegion);
      //
      // // Draw the hit test rect
      // gdiRegion.MakeEmpty();
      // gdiRegion.Union(gdiText);
      // DstGraphics.FillRegion(&greenBrush, &gdiRegion);

      "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

      C Offline
      C Offline
      cmk
      wrote on last edited by
      #2

      It doesn't, it returns false. I cut/paste the above into a new project and it was fine.

      ...cmk Save the whales - collect the whole set

      M 1 Reply Last reply
      0
      • C cmk

        It doesn't, it returns false. I cut/paste the above into a new project and it was fine.

        ...cmk Save the whales - collect the whole set

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        I was afraid of that. If you get a chance can you please check your gdiplus.dll version? It doesn't work properly for me or the OP. Thanks much! Mark

        "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

        C 1 Reply Last reply
        0
        • M Mark Salsbery

          I was afraid of that. If you get a chance can you please check your gdiplus.dll version? It doesn't work properly for me or the OP. Thanks much! Mark

          "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

          C Offline
          C Offline
          cmk
          wrote on last edited by
          #4

          I'm running Win2003 R2 x64. From VS 2005 i created a new Win32 x86 project and pasted the code in the WM_PAINT case. My gdiplus.dll's are: C:\WIN\WinSxS\amd64_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.3790.1830_x-ww_56CDF238\GdiPlus.dll File Version: 5.2.3790.1830 (srv03_sp1_rtm.050324-1447) and, C:\WIN\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.3790.1830_x-ww_24C40C58\GdiPlus.dll File Version: 5.2.3790.1830 (srv03_sp1_rtm.050324-1447)

          ...cmk Save the whales - collect the whole set

          M 1 Reply Last reply
          0
          • C cmk

            I'm running Win2003 R2 x64. From VS 2005 i created a new Win32 x86 project and pasted the code in the WM_PAINT case. My gdiplus.dll's are: C:\WIN\WinSxS\amd64_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.3790.1830_x-ww_56CDF238\GdiPlus.dll File Version: 5.2.3790.1830 (srv03_sp1_rtm.050324-1447) and, C:\WIN\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.3790.1830_x-ww_24C40C58\GdiPlus.dll File Version: 5.2.3790.1830 (srv03_sp1_rtm.050324-1447)

            ...cmk Save the whales - collect the whole set

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            I was afraid of that too LOL Mine is XPSP2 gdiplus.dll is 5.1.3102.2180 Where is the mythical GDI+ 1.1 ... Thank you! Mark

            "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

            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