| View previous topic :: View next topic |
| Author |
Message |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Sun Jan 01, 2006 1:37 am Post subject: How to get COLORs |
|
|
%%ScreenHeight = @sysinfo(screenheight)
%%ScreenWidth = @sysinfo(screenwidth)
%%Colours = ?
info Current display resolution:@CR()%%ScreenWidth x %%ScreenHeight x %%Colours
Any IDEA ? |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sun Jan 01, 2006 9:50 am Post subject: |
|
|
What colors are you needing...system colors?
If it's System colors, look in the registryat "HKEY_CURRENT_USER\Control Panel\Colors" and you can use @REGREAD() to get the value you're looking for. |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Sun Jan 01, 2006 1:44 pm Post subject: |
|
|
32 bit
16 bit
8 bit
you know Windows(TM) desktop color setting
My registry only have this -> HKEY_CURRENT_USER\Conrol Panel\Desktop |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sun Jan 01, 2006 7:46 pm Post subject: |
|
|
| What OS are you using? |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sun Jan 01, 2006 7:56 pm Post subject: |
|
|
On my XP system the video resolution settings are found at:
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\{475FCFF4-B046-48A0-BA4D-74223B099163}\0000" |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Mon Jan 02, 2006 7:38 am Post subject: |
|
|
XP i have
NO and no
Every display card have its own mambo jumbo i need something universal
Somewhere this most be writen
DirectX have it..
Control panel have it..
Mybe some API calls or ???
Thanks anyway... |
|
| Back to top |
|
 |
henrywood Contributor

Joined: 21 Sep 2004 Posts: 66 Location: Copenhagen, Denmark
|
Posted: Mon Jan 02, 2006 9:29 pm Post subject: |
|
|
Hi filip !
I seem to remember that Tommy's vdsutil.dll can return resolution and colour depth and change them on the fly as well
Hope this helps
Henrik |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Wed Jan 04, 2006 7:27 pm Post subject: |
|
|
Try this:
| Code: |
loadlib user32
loadlib gdi32
%h = @lib(user32,GetDesktopWindow,int:,)
%d = @lib(user32,GetDC,INT:,%h)
%%depth = @lib(GDI32,GetDeviceCaps,int:,%d,12)
%x = @lib(user32,ReleaseDC,int:,%h,%d)
freelib user32
freelib gdi32
info The color depth is %%depth "bits"
exit
|
Hope that helps...
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Jan 04, 2006 10:32 pm Post subject: |
|
|
SOLUTION
| Code: | loadlib user32
loadlib gdi32
%h = @lib(user32,GetDesktopWindow,int:,)
%d = @lib(user32,GetDC,INT:,%h)
%%ColorDepth = @lib(GDI32,GetDeviceCaps,int:,%d,12)
%x = @lib(user32,ReleaseDC,int:,%h,%d)
freelib user32
freelib gdi32
%%ScreenHeight = @sysinfo(screenheight)
%%ScreenWidth = @sysinfo(screenwidth)
info Current display resolution:@CR()%%ScreenWidth x %%ScreenHeight x %%ColorDepth bit
exit
|
Thanks... |
|
| Back to top |
|
 |
|