Carsten Sørensen wrote:
> On 31/05/07, Pedro Alves 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
>
>
Great!
Can you provide a patch (with a change log entry)?
I would suggest something like:
#ifdef _WIN32_WCE
#define SYSTEM_COLOR_BASE_OFFSET 0x40000000
#else
#define SYSTEM_COLOR_BASE_OFFSET 00
#endif
(...)
#define COLOR_BTNFACE (SYSTEM_COLOR_BASE_OFFSET + nnn)
(...)
Cheers,
Pedro Alves
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel