<?xml version="1.0" encoding="iso-8859-2"?>
<!-- name="generator" content="pyblosxom/1.0.0 (May 24, 2004)" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
<channel>
<title>... with flags unfurled...  Aug 2004</title>
<link>http://znouza.meinlschmidt.org/blog/</link>
<description>we reached the dizzy heights...</description>
<language>en</language>
<item>
    <title>Displaying an alert window</title>
    <link>http://znouza.meinlschmidt.org/blog/programming/palmbits/040806-1210.html</link>
    <description>&lt;p&gt;resource - .h file:&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;#define CustomAlert 1000
&lt;/pre&gt;

&lt;p&gt;resource - .rcp file:&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;ALERT ID CustomAlert
BEGIN
  TITLE &quot;custom alert&quot;
  MESSAGE &quot;^1\n^2\n^3&quot;
  BUTTONS &quot;OK&quot;
END
&lt;/pre&gt;

&lt;p&gt;code:&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;
    Char alertMsg[64];
    StrPrintF(alertMsg, &quot;Your value is %d&quot;, yourValue);
    &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Form.html#997090&quot;&gt;FrmCustomAlert&lt;/a&gt;(CustomAlert, alertMsg, &quot;&quot;, &quot;&quot;);
&lt;/pre&gt;	

&lt;p&gt;
do NOT pass NULL value as param in FrmCustomAlert - always use &quot;&quot;.
&lt;/p&gt;						
</description>
  </item>
<item>
    <title>Changing graphics mode</title>
    <link>http://znouza.meinlschmidt.org/blog/programming/palmbits/040804-1535.html</link>
    <description>&lt;pre class=&quot;code&quot;&gt;
Boolean SetScreenColorDepth(int depth)
{
    UInt16 reqDepth=depth;
    Err err = &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1012037&quot;&gt;WinScreenMode&lt;/a&gt;(winScreenModeSet,NULL,NULL,&amp;amp;reqDepth,NULL);
    return !err;
}

Boolean RestoreScreenColorDepth(void)
{
    Err err = &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1012037&quot;&gt;WinScreenMode&lt;/a&gt;(winScreenModeSetToDefaults,NULL,NULL,NULL,NULL);
    return !err;
}
&lt;/pre&gt;	
&lt;p&gt;
You must set color depth before any window is created. Check error codes for unsupported modes.
&lt;/p&gt;
</description>
  </item>
<item>
    <title>Double buffering</title>
    <link>http://znouza.meinlschmidt.org/blog/programming/palmbits/040803-1522.html</link>
    <description>&lt;p&gt;This is an example, how to do and use double buffering (offscreen window) to create smooth animations&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1012852&quot;&gt;WinHandle&lt;/a&gt; displayWindow;
&lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1012852&quot;&gt;WinHandle&lt;/a&gt; offscreenWindow;

void CreateOffScreen() {
    Err err;
    offscreenWindow = &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1013152&quot;&gt;WinCreateOffscreenWindow&lt;/a&gt;(160,160, screenFormat, &amp;amp;err);
}

void PaintOffScreen() {
    &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1013152&quot;&gt;WinSetDrawWindow&lt;/a&gt;(offscreenWindow);
    // draw there
}

void Show() {
    RectangleType bounds;

    &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1016515&quot;&gt;WinSetDrawWindow&lt;/a&gt;(displayWindow);
    &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1014219&quot;&gt;WinGetBounds&lt;/a&gt;(displayWindow, &amp;amp;bounds);
    &lt;a href=&quot;http://www.palmos.com/dev/support/docs/palmos/Window.html#1013039&quot;&gt;WinCopyRectangle&lt;/a&gt; (offscreenWindow, 0, &amp;amp;bounds, 0, 0, 0);
}
&lt;/pre&gt;
</description>
  </item>
<item>
    <title>My new Thinkpad...</title>
    <link>http://znouza.meinlschmidt.org/blog/040802-1530.html</link>
    <description>&lt;p&gt;I&apos;ve bought brand new IBM. It&apos;s marvellous and I&apos;m trying to install my
favourite &lt;a href=&quot;http://www.slackware.com&quot;&gt;OS&lt;/a&gt; now.&lt;/p&gt;

&lt;p class=&quot;image&quot;&gt;
&lt;img src=&quot;http://terminal.sws.cz/img.asp?stiid=57892&quot; alt=&quot;IBM R51&quot;&gt;
&lt;/p&gt;

&lt;p&gt;Updated: all my wishes &lt;a href=&quot;http://www.meinlschmidt.org/~znouza/doc/r51/&quot;&gt;succeeeeeeded&lt;/a&gt; :) It&apos;s GREAT&lt;/p&gt;
</description>
  </item>
   </channel>
</rss>