<?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 - How to draw string without using Draw() - Comments</title>
 <link>http://www.newlc.com/en/topic-16129</link>
 <description>Comments for &quot;How to draw string without using Draw()&quot;</description>
 <language>en</language>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34790</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi,&lt;br /&gt;&lt;br /&gt;&amp;nbsp; I suggest you should take a look at helloworldplus example from Series60Ex. There is a custom draw method:&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;void CHelloWorldPlusAppView::UserDraw() const&lt;/div&gt;However, behaviour you&amp;#039;ve described is strange. Could you show how (and where) are you invoking your custom draw method when it&amp;#039;s not working?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&amp;nbsp; Damian&lt;/div&gt;</description>
 <pubDate>Thu, 02 Nov 2006 09:49:27 +0100</pubDate>
 <dc:creator>l0rd</dc:creator>
 <guid isPermaLink="false">comment 34790 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34789</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;O sorry Badshah ,&lt;br /&gt;&lt;br /&gt;Actully that gc.Activate( Window() ); and gc.Deactivate(); is commented only, I just forgot to put the comment before putting in to forum.&lt;br /&gt;ActivateGc();&lt;br /&gt;DeactivateGc(); &lt;br /&gt; is working well but on system keys only like EAknSoftkeyBack not on my menu command&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 01 Nov 2006 07:47:47 +0100</pubDate>
 <dc:creator>Priyankaj</dc:creator>
 <guid isPermaLink="false">comment 34789 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34788</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi prj,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; here is the description for WSERV 10 panic &lt;br /&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;Attempted to activate an already active graphics context.&lt;br /&gt;&lt;br /&gt;On the server side, this is raised by CWsGc::Activate() as a response to a EWsGcOpActivate request.&lt;br /&gt;&lt;br /&gt;The request is sent by the client-side method CWindowGc::Activate(). &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I think you can comment the codes &lt;br /&gt;gc.Activate( Window() ); and&lt;br /&gt;gc.Deactivate();&lt;br /&gt;and try....&lt;br /&gt;hope this helps..&lt;br /&gt;regards&lt;br /&gt;Badshah&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 01 Nov 2006 07:18:20 +0100</pubDate>
 <dc:creator>Badshah</dc:creator>
 <guid isPermaLink="false">comment 34788 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34787</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi Damian,&lt;br /&gt;&lt;br /&gt;Thanks very much for your reply. It helped me alot but my problem is not solved yet. &lt;br /&gt;I am calling my function from CMyAppUi as - &lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;void CMyAppUi::HandleCommandL(TInt aCommand)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; switch ( aCommand )&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case EAknSoftkeyBack:&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;iAppContainer-&amp;gt;DrawMyText(_L(&amp;quot;Hello My Text&amp;quot;));&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;break;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case EEikCmdExit:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Exit();&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;break;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;and the problem is this is working only with case EAknSoftkeyBack, on other menu items it is not showing any thing. &lt;br /&gt;my Draw function is - &lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;void CMyContainer::DrawMyText(const TDesC &amp;amp;aText)&lt;br /&gt;{&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ActivateGc();&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;m_BufDrawText.Zero();&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;m_BufDrawText.Copy(aText);&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;CWindowGc &amp;amp;gc = SystemGc();&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;gc.Activate( Window() );&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;gc.UseFont( iCoeEnv-&amp;gt;NormalFont() );&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;gc.DrawText( m_BufDrawText, TPoint( 30, 30 ) );&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;gc.Deactivate();&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DeactivateGc(); &lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for gc.Activate( Window() ); ....gc.Deactivate(); It is giving WSERV 10.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I want to work my DrawMyText() with any menu commmand...&lt;br /&gt;&lt;br /&gt;hope u can help&lt;br /&gt;&lt;br /&gt;thanks&lt;/div&gt;</description>
 <pubDate>Tue, 31 Oct 2006 13:56:22 +0100</pubDate>
 <dc:creator>Priyankaj</dc:creator>
 <guid isPermaLink="false">comment 34787 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34786</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi,&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Are you calling your own function from Draw()? If not, you have to call ActivateGc() before and DeactivateGc() after calling your own function, cause the standard graphics context needs to be activated and deactivated manually (in case of Draw() function these methods are called by the framework).&lt;br /&gt;&amp;nbsp; If this is not the case, please provide some more information or source code.&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;&amp;nbsp; Damian&lt;/div&gt;</description>
 <pubDate>Tue, 31 Oct 2006 11:22:38 +0100</pubDate>
 <dc:creator>l0rd</dc:creator>
 <guid isPermaLink="false">comment 34786 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34785</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi Damian &lt;br /&gt;&lt;br /&gt;I m drawing some text in draw function , working fine, but I want to draw my text in my own custom function i.e. want to redraw the text. that is giving error WSERV 9.&lt;br /&gt;&lt;br /&gt;TRied ur idea - &lt;br /&gt;&lt;br /&gt;gc.Activate( Window() );&lt;br /&gt;....&lt;br /&gt;gc.Deactivate();&lt;br /&gt;&lt;br /&gt;Not giving any error but not drawing any contentes alos...&lt;br /&gt;can u plz advise?&lt;/div&gt;</description>
 <pubDate>Tue, 31 Oct 2006 10:23:36 +0100</pubDate>
 <dc:creator>Priyankaj</dc:creator>
 <guid isPermaLink="false">comment 34785 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34784</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi!&lt;br /&gt;U wanna inform the user na.. then use information note after server finishes the work.&lt;br /&gt;&lt;br /&gt;_LIT(KMessage,&amp;quot;The Message&amp;quot;);&lt;br /&gt; CAknInformationNote* informationNote = new (ELeave)Â  Â &lt;br /&gt;Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  CAknInformationNote;&lt;br /&gt; informationNote-&amp;gt;ExecuteLD(KMessage);&lt;br /&gt;&lt;br /&gt;Hope this helps uÂ  &lt;img src=&quot;/en/sites/all/modules/smf_filter/smf_smileys/smiley.gif&quot; alt=&quot;Smiley&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Shilpa K&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 26 Sep 2006 11:00:44 +0200</pubDate>
 <dc:creator>ShilpaK</dc:creator>
 <guid isPermaLink="false">comment 34784 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129#comment-34783</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi,&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Try this:&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;...&lt;br /&gt;CWindowGc &amp;amp;gc = SystemGc();&lt;br /&gt;gc.Activate( Window() );&lt;br /&gt;gc.UseFont( iCoeEnv-&amp;gt;NormalFont() );&lt;br /&gt;gc.DrawText( ptext, TPoint( 10, 20 ) );&lt;br /&gt;gc.Deactivate();&lt;br /&gt;...&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Damian&lt;/div&gt;</description>
 <pubDate>Tue, 26 Sep 2006 10:44:41 +0200</pubDate>
 <dc:creator>l0rd</dc:creator>
 <guid isPermaLink="false">comment 34783 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to draw string without using Draw()</title>
 <link>http://www.newlc.com/en/topic-16129</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/topic-16129&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/topic-16129#comments</comments>
 <category domain="http://www.newlc.com/en/forums/symbian-c">Symbian C++</category>
 <pubDate>Tue, 26 Sep 2006 09:44:06 +0200</pubDate>
 <dc:creator>kuldeep.up</dc:creator>
 <guid isPermaLink="false">15832 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
