I
Ian Williamson
Does anyone know if these can be P/Invoked on a CE.NET
4.1 device? If so, which library are they in?
Thanks, Ian
4.1 device? If so, which library are they in?
Thanks, Ian
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Ian Williamson said:That is the library I have been referring too, but it
does not seem to have any effect, even when SetSysColors
returns true.
[DllImport("coredll.dll")]
private static extern Int32 GetSysColor(Int32 nIndex);
[DllImport("coredll.dll")]
private static extern Boolean SetSysColors(int cElements,
Int32[] lpaElements, Int32[] lpaRgbValues);
private const int COLOR_ACTIVECAPTION = 19; //menu
background
public void ChangeColor()
{
int[] element = new int[] {COLOR_ACTIVECAPTION};
int[] rgb = new int[] {Color.Red.ToArgb() & 0x00FFFFFF};
bool b = SetSysColors(1, element, rgb);
}
-----Original Message-----
Almost everything in the API is in coredll.dll. That's the case here, too.
Paul T.
.
Ian Williamson said:That is the library I have been referring too, but it
does not seem to have any effect, even when SetSysColors
returns true.
[DllImport("coredll.dll")]
private static extern Int32 GetSysColor(Int32 nIndex);
[DllImport("coredll.dll")]
private static extern Boolean SetSysColors(int cElements,
Int32[] lpaElements, Int32[] lpaRgbValues);
private const int COLOR_ACTIVECAPTION = 19; //menu
background
public void ChangeColor()
{
int[] element = new int[] {COLOR_ACTIVECAPTION};
int[] rgb = new int[] {Color.Red.ToArgb() & 0x00FFFFFF};
bool b = SetSysColors(1, element, rgb);
}
-----Original Message-----
Almost everything in the API is in coredll.dll. That's the case here, too.
Paul T.
.
COLOR_ACTIVECAPTION, you'll find-----Original Message-----
Your declaration of COLOR_ACTIVECAPTION is way off the mark. If you look at
winuser.h in the PPC SDK or somewhere for
that it's
( 2 | SYS_COLOR_INDEX_FLAG)
and SYS_COLOR_INDEX_FLAG is 0x40000000.
If you make that change, it works as expected, except that
COLOR_ACTIVECAPTION is *not* the menu background color; it's the color of
the title bar for windows when they are the active window. I think that you
may want COLOR_MENU, instead, although I haven't tried that.
Paul T.
That is the library I have been referring too, but it
does not seem to have any effect, even when SetSysColors
returns true.
[DllImport("coredll.dll")]
private static extern Int32 GetSysColor(Int32 nIndex);
[DllImport("coredll.dll")]
private static extern Boolean SetSysColors(int cElements,
Int32[] lpaElements, Int32[] lpaRgbValues);
private const int COLOR_ACTIVECAPTION = 19; //menu
background
public void ChangeColor()
{
int[] element = new int[] {COLOR_ACTIVECAPTION};
int[] rgb = new int[] {Color.Red.ToArgb() & 0x00FFFFFF};
bool b = SetSysColors(1, element, rgb);
}
That's-----Original Message-----
Almost everything in the API is in coredll.dll.
the case here, too.Paul T.
Does anyone know if these can be P/Invoked on a CE.NET
4.1 device? If so, which library are they in?
Thanks, Ian
.
.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.