Region As Loop Control

This is a discussion on Region As Loop Control within the Windows Programming forums, part of the Platform Specific Boards category; Hello, Does anyone know an easy way to test if a GDI region is non-empty?...

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,259

    Region As Loop Control

    Hello,

    Does anyone know an easy way to test if a GDI region is non-empty?

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Maybe:
    Code:
    RECT rc;
    
    while (GetRgnBox(hRgn, &rc) != NULLREGION)
    {
        ...
    }

  3. #3
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,259
    Well later on I tried using:-
    Code:
    if (CombineRgn(hRgn, hRgn, NULL, RGN_COPY) != NULLREGION)
    {
        ...
    }
    I dunno what it's like for efficiency but it doesn't need a RECT. Thanks anyway.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 12-01-2008, 09:09 AM
  2. Personal Program that is making me go wtf?
    By Submeg in forum C Programming
    Replies: 20
    Last Post: 06-27-2006, 12:13 AM
  3. A somewhat bizzare problem!!! - WHILE LOOP
    By bobthebullet990 in forum C Programming
    Replies: 3
    Last Post: 03-31-2006, 06:19 AM
  4. syntax question
    By cyph1e in forum C Programming
    Replies: 19
    Last Post: 03-30-2006, 11:59 PM
  5. when a while loop will stop ?
    By blue_gene in forum C Programming
    Replies: 13
    Last Post: 04-20-2004, 03:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21