I have found the solution just by trying:
I have to cast &MyPattern and &OriginalPattern to void *:
WinSetPattern ( (void*)&MyPattern );
But it does not match the description of WinSetPattern in Palm OS
Reference...
Emil
On 21 Jan 2004, at 16:24, Dyekiss Emil Gergely wrote:
> I am trying to draw a gray rectangle on a bw display.
> I thing I have to use the WinSetPattern and WinFillRectangle
> functions.
> At first I get the current pattern, then set mine, fill the rectangle,
> and finally set the original.
> But when I am trying to build the program, GCC sends me the
> warning message:
>
> warning: passing arg 1 of 'WinSetPattern' from incompatible pointer
> type
>
> What is the problem? Can anybody help me? It is just a warning
> message, the rectangle is ok, but the warning message is always
> coming...
>
> Thanks,
> Emil
>
> Here is something like my code:
>
> // declaration of pattern variables:
> CustomPatternType OriginalPattern;
> CustomPatternType MyPattern = { 0x55, 0xAA, 0x55, 0xAA,
> 0x55, 0xAA, 0x55, 0xAA };
>
> ...
>
> WinPushDrawState();
>
> ...
> // setting the rectangle r's values
>
> WinGetPattern ( &OriginalPattern );
> WinSetPattern ( &MyPattern );
> WinFillRectangle ( &r, 0 );
> WinSetPattern ( &OriginalPattern );
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
> http://www.palm
os.com/dev/support/forums/
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/