Hi Raj,

now we come closer to the problem. Let's imagine your device is capable to display different grayscales. First you have to as the OS for the right index for your grayscale value. That's what WinRGBToIndex is for. Next thing is you have to try to switch on grayscale at program start. Look at this code snippet:

// this function set the screenmode to the best mode possible for a given colordepth
static
UInt16 SetScreenMode()
{
UInt32 tmp_depth, version, attr;
Int8 k;
Err error = 1;

[...removed code for high resolution...]

/* if something fails above, we will enter this branch for conservative screen settings */
if (error)
{
error = WinScreenMode(winScreenModeGetSupportedDepths, &width, &height, &tmp_depth, &bColorEnabled);

tmp_depth &= MAX_COLOR_MASK;
k = 8;
while (((tmp_depth & 0x80) == 0) && (k > 0))
{
tmp_depth = tmp_depth << 1;
k--;
}

if (k > 0)
{
depth = k;

error = WinScreenMode(winScreenModeGetSupportsColor, &width, &height, &depth, &bColorEnabled);
error = WinScreenMode(winScreenModeSet, &width, &height, &depth, &bColorEnabled);
}

error = WinScreenMode(winScreenModeGet, &width, &height, &depth, &bColorEnabled);
}

return error;
}

It will switch on grayscale or colormode up to the bit depth given with MAX_COLOR_MASK. I use 0x0ff for it, because I don't care for 16 bit atm (at the moment).
Ok, I'm sorry that I give you the link to the german version of my program. The question is, does it show you anything in grayscale? The small x-mas tree by any chance? Black'n'white would be just very pixely.

Henk

Rajasekhar Reddy P wrote:
Hi Henk
i didn't use the WinRGBToIndex function
i just passed paramets 0 to 255 for WinSetTextColor
How to enabled grayscale. I think that there is no
function WinSetScreenMode. WinScreenMode function is
avaliable. I did n't see any other programs with
grayscale. I download the file which you gave to me
URL
the program was nice. But it is not in engilsh i did
n't understand the words. Can you tell me source code for drawing text in gray
color
Thanks
Raj

--- Henk Jonas <[EMAIL PROTECTED]> wrote: > Hi
Raj,

strange... What do you use as color? Do you have
grayscale enabled (WinSetScreenMode)? Do you use WinRGBToIndex with a
gray rgb value (127, 127, 127)? And it still don't work? Have you seen
grayscale with other programs? Have you seen grayscale with
http://pdassi.de/util/getdownload.php/basketball_de_xmas.prc?id=18885

?

Henk

Rajasekhar Reddy P wrote:

Hi Henk
 yes i am following same way only
i am using customTableItem and callback method
in that i am setting color  and drawing text on
table

WinDrawChars but i am not finding any difference
between rows. Sorry my divice is Palm IIIxe Thanks
Raj

--

-------------------------------------------------------------------------

[EMAIL PROTECTED] www.metaviewsoft.de

<A

HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>

<IMG

SRC="http://user.cs.tu-berlin.de/~jonash/werbung_palmos.jpg";></A>

-------------------------------------------------------------------------

--
For information on using the Palm Developer Forums,
or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com



--
-------------------------------------------------------------------------
[EMAIL PROTECTED]                                       www.metaviewsoft.de

<A HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
<IMG SRC="http://user.cs.tu-berlin.de/~jonash/werbung_palmos.jpg";></A>
-------------------------------------------------------------------------


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to