<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Refreshing/Flushing screen to display several bitmaps ... - Comments</title>
 <link>http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps</link>
 <description>Comments for &quot;Refreshing/Flushing screen to display several bitmaps ...&quot;</description>
 <language>en</language>
<item>
 <title>Re: Refreshing/Flushing screen to display several bitmaps ...</title>
 <link>http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps#comment-49563</link>
 <description>&lt;p&gt;Thank you for your advices alh,&lt;/p&gt;

&lt;p&gt;I removed all my activate/deactivate and all User::After.&lt;/p&gt;

&lt;p&gt;In my HandleCommandL to handle menu events, I removed my &lt;span style=&quot;font-weight:bold&quot;&gt;ShowSplashScreen()&lt;/span&gt; and &lt;span style=&quot;font-weight:bold&quot;&gt;Show2ndScren()&lt;/span&gt;, I let my SetScreenType function and I added the DrawNow() function at the end: It works, I can change my background as I wanted!&lt;/p&gt;

&lt;p&gt;Thx&lt;/p&gt;</description>
 <pubDate>Wed, 03 Dec 2008 11:54:19 +0100</pubDate>
 <dc:creator>laurents</dc:creator>
 <guid isPermaLink="false">comment 49563 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Refreshing/Flushing screen to display several bitmaps ...</title>
 <link>http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps#comment-49560</link>
 <description>&lt;p&gt;Your problem with you never seeing the first bitmap could just be because of how the epoc emulator starts up when you start it up from carbide.&lt;/p&gt;

&lt;p&gt;Your app actually starts far before the UI is fully initialized, so it probably has time to go to the second image before you get to see it.&lt;br /&gt;
Try start epoc from a command prompt, and then just navigate to and start the app like you would on a phone, and you might see your first splash too.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 03 Dec 2008 09:44:56 +0100</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 49560 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Refreshing/Flushing screen to display several bitmaps ...</title>
 <link>http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps#comment-49559</link>
 <description>&lt;p&gt;as long as your function is called from within a draw function, you should neither call activate, nor deactivate.&lt;br /&gt;
I notice you have a lone gc.Deactivate() in your &quot;ShowSplashScreen&quot;.&lt;/p&gt;

&lt;p&gt;Remove them all...&lt;/p&gt;

&lt;p&gt;Also, you should absolutely not call User::After from within a draw function, that can make the view framework timeout and give you a ViewSrv::11 panic.&lt;br /&gt;
Draw functions must always return as quickly as possible.&lt;/p&gt;

&lt;p&gt;You should let a timer handle the delay, let it change the image to show and call DrawNow after a second.&lt;br /&gt;
CPeriodic and a static callback should be convenient for this.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 03 Dec 2008 09:41:38 +0100</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 49559 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Refreshing/Flushing screen to display several bitmaps ...</title>
 <link>http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps#comment-49553</link>
 <description>&lt;p&gt; I updated my source code :&lt;/p&gt;

&lt;p&gt;at begining iScreenType = 0;&lt;br /&gt;
&lt;pre class=&quot;bb-code-block&quot;&gt;
void CGraphicsAppView::Draw( const TRect&amp; /*aRect*/ ) const
    {  
    switch( iScreenType )
        {
        case 1 :
            Show2ndDisplay();
            break;
        case 0 :
        default:
            ShowSplashDisplay();
            break;
        }
    }
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;When I let the pair gc.Activate( *DrawableWindow() ); and gc.Deactivate(); I get a WSERV 10 panic :&lt;br /&gt;
&quot;Attempted to activate an already active graphics context. &quot;.&lt;br /&gt;
When I start the application the splash screen is displayed then when I click in my menu item corresponding to the Show2ndDisplay() I set the iScreenType variable and the panic is raised.&lt;/p&gt;

&lt;p&gt;When i remove the pair Activate/Deactivate I get a WSERV 9 panic :&lt;br /&gt;
&quot;A drawing request was sent to a graphics context when the context was not active. &quot;&lt;/p&gt;

&lt;p&gt;I don&#039;t understand :/&lt;br /&gt;
Can somebody please tell me where am I going wrong.&lt;br /&gt;
Thanks. &lt;/p&gt;</description>
 <pubDate>Tue, 02 Dec 2008 18:04:58 +0100</pubDate>
 <dc:creator>laurents</dc:creator>
 <guid isPermaLink="false">comment 49553 at http://www.newlc.com</guid>
</item>
<item>
 <title>Refreshing/Flushing screen to display several bitmaps ...</title>
 <link>http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps</link>
 <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I created several functions to display a picture for a given time :&lt;br /&gt;
 &lt;ul class=&quot;bb-list&quot; style=&quot;list-style-type:;&quot;&gt;
  &lt;li&gt; ShowSplashDisplay : to display a splash screen picture&lt;/li&gt;
  &lt;li&gt; Show2ndDisplay : to display an other picture during my program execution&lt;/li&gt;
 &lt;/ul&gt;&lt;/p&gt;

&lt;p&gt;I don&#039;t succeed to display two pictures in the same program execution.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/forum/refreshingflushing-screen-display-several-bitmaps#comments</comments>
 <category domain="http://www.newlc.com/en/forums/2d-3d-graphics">Bitmaps and Graphics</category>
 <pubDate>Tue, 02 Dec 2008 15:40:39 +0100</pubDate>
 <dc:creator>laurents</dc:creator>
 <guid isPermaLink="false">22280 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
