On 31/05/07, Pedro Alves <[EMAIL PROTECTED]> wrote:
> for (int i = 0; i < MAX_INT; i++)
>     if (GetSysColor(i) != 0)
>        {
>           Hey ma, I found a valid color index!
>        }
>
> Me wonders how long that loop would take to run.

That's good idea! It takes five or ten minutes (didn't keep an eye on
the clock) before it starts getting results.

   for(unsigned int i = 0; i <= 0xFFFFFFFF; ++i)
   {
       if(0 != GetSysColor(i))
           _tprintf(_T("Got a color, %08X\n"), i);
       if((i & 0xFFFFF) == 0)
           _tprintf(_T("Status - i == %08X\n"), i);
   }

Starts producing results on my device when i == 0x40000000. Nice to
have verified my initial manual probing this way :-D


Regards,
Carsten Sorensen

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to