<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software Solutions中的主题 Re: eGUI: main screen is not rewritten after return from activated screen</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/eGUI-main-screen-is-not-rewritten-after-return-from-activated/m-p/237405#M6630</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the problem could be with redrawing the background of the screen, If you don't have filled all screen by any object, then then background of the screen MUST be draw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this is used macro in config:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Define a default flags &lt;/P&gt;&lt;P&gt;#define D4D_SCR_F_DEFAULT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (D4D_SCR_F_BCKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 May 2013 07:52:17 GMT</pubDate>
    <dc:creator>Gargy</dc:creator>
    <dc:date>2013-05-17T07:52:17Z</dc:date>
    <item>
      <title>eGUI: main screen is not rewritten after return from activated screen</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/eGUI-main-screen-is-not-rewritten-after-return-from-activated/m-p/237404#M6629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must be missing something obvious. I'm coding and trying to use simple window, that will display message and have OK button on it.&lt;/P&gt;&lt;P&gt;I call this child windows with :&lt;/P&gt;&lt;P&gt;D4D_ActivateScreen(&amp;amp;screen_msg, D4D_FALSE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then call this from child screen when OK button is pressed :&lt;/P&gt;&lt;P&gt;D4D_EscapeScreen();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Child window shows up - works ok, but when I click on OK button, main screen doesn't redraw properly so screen looks like freezed and doesn't change at all...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add title bar and click on close icon it works ok, and main screen show up...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must be doing wrong something obvious and I can't see it. I'm attaching code of child window below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Bul.&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_13685280459396460 jive_text_macro jive_macro_code" jivemacro_uid="_13685280459396460"&gt;
&lt;P&gt;/*!&lt;/P&gt;
&lt;P&gt;* \file&amp;nbsp;&amp;nbsp;&amp;nbsp; screen_text.c&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;* This file simply displays a message&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*/&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#include "lcd.h"&lt;/P&gt;
&lt;P&gt;#include "d13_common.h"&lt;/P&gt;
&lt;P&gt;#include "D13_GUI_Skin.h"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;D4D_EXTERN_SCREEN(screen_main);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;D4D_CLR_SCHEME ScreenColorSchemeMsg;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;D4D_CHAR&amp;nbsp; str_message[50]=" ";&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// Button object "Ok"&lt;/P&gt;
&lt;P&gt;#define SCR_MSG_BTN_SIZEX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BTN_SIZEX&lt;/P&gt;
&lt;P&gt;#define SCR_MSG_BTN_SIZEY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BTN_SIZEY&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#define SCR_MSG_BTN_POSX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 130&lt;/P&gt;
&lt;P&gt;#define SCR_MSG_BTN_POSY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 180&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/*****************************************************************************&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;* Graphic objects callback/events functions declaration&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*****************************************************************************/&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Button Ok OnClick CallBack&lt;/P&gt;
&lt;P&gt;static void Screenmsg_OnClickBtnOk(D4D_OBJECT* pThis);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/*****************************************************************************&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;* Graphic object declarations&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*****************************************************************************/&lt;/P&gt;
&lt;P&gt;/* Declaration of label */&lt;/P&gt;
&lt;P&gt;D4D_DECLARE_STD_LABEL(Screenmsg_lbl_Message_txt, str_message, 160, 110, 50, 50, FONT_ARIAL16_BOLD)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* Declaration of button */&lt;/P&gt;
&lt;P&gt;//D4D_DECLARE_TXT_RBUTTON(Screenmsg_btn_Ok, "Ok", SCR_MSG_BTN_POSX, SCR_MSG_BTN_POSY, SCR_MSG_BTN_SIZEX, SCR_MSG_BTN_SIZEY, BTN_RADIUS, FONT_BERLIN_SANS_FBDEMI12, Screenmsg_OnClickBtnOk)&lt;/P&gt;
&lt;P&gt;D4D_DECLARE_RBUTTON(Screenmsg_btn_Ok, "Ok", SCR_MSG_BTN_POSX, SCR_MSG_BTN_POSY, SCR_MSG_BTN_SIZEX, SCR_MSG_BTN_SIZEY, BTN_RADIUS, (D4D_BTN_MSG), NULL, NULL, NULL, FONT_BERLIN_SANS_FBDEMI12, NULL, Screenmsg_OnClickBtnOk,NULL)&lt;/P&gt;
&lt;P&gt;//D4D_DECLARE_RBUTTON(Screenset_number_btn_Back, "Nazaj", SCR_set_number_BTN_BACK_POSX, SCR_set_number_BTN_BACK_POSY, SCR_set_number_BTN_SIZEX, SCR_set_number_BTN_SIZEY, BTN_RADIUS, (D4D_BTN_SET_NUMBER), NULL, NULL, NULL, FONT_ARIAL16_BOLD, NULL, Screenset_number_OnClickBtnBack,NULL)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/*****************************************************************************&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;* eGUI/D4D screen declaration&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*****************************************************************************/&lt;/P&gt;
&lt;P&gt;/* Declare the screen and all its objects */&lt;/P&gt;
&lt;P&gt;D4D_DECLARE_STD_SCREEN_BEGIN(screen_msg, Screenmsg_)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D4D_DECLARE_SCREEN_OBJECT(Screenmsg_lbl_Message_txt)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D4D_DECLARE_SCREEN_OBJECT(Screenmsg_btn_Ok)&lt;/P&gt;
&lt;P&gt;D4D_DECLARE_SCREEN_END()&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/*****************************************************************************&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;* Local variables&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*****************************************************************************/&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/*****************************************************************************&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;* Graphic objects callback/events functions declaration&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;*****************************************************************************/&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Button Ok OnClick CallBack&lt;/P&gt;
&lt;P&gt;static void Screenmsg_OnClickBtnOk(D4D_OBJECT* pThis)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; D4D_UNUSED(pThis);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //Go back to the main screen&lt;/P&gt;
&lt;P&gt;&amp;nbsp; D4D_EscapeScreen();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* called on screen initialization proces */&lt;/P&gt;
&lt;P&gt;static void Screenmsg_OnInit()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;//&amp;nbsp; D4D_TEXT_PROPERTIES def_txtProperties, right_txtProperties, left_txtProperties;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; D4D_TEXT_PROPERTIES def_txtProperties;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; // Labels text propeties initialization&lt;/P&gt;
&lt;P&gt;&amp;nbsp; def_txtProperties.bits.bAlignHoriz = D4D_TXT_PRTY_ALIGN_H_CENTER;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; D4D_SetTextProperties(&amp;amp;Screenmsg_lbl_Message_txt, def_txtProperties);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D4D_LabelSetText(&amp;amp;Screenmsg_lbl_Message_txt,str_screen_msg_lbl);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/***********************************************************************/&lt;/P&gt;
&lt;P&gt;/* called with each screen activation */&lt;/P&gt;
&lt;P&gt;static void Screenmsg_OnActivate()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* Customize the color scheme to make sure text is blue*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ScreenColorSchemeMsg = *D4D_GetDefaultScheme();&lt;/P&gt;
&lt;P&gt;//&amp;nbsp; ScreenColorSchemeMsg.fore = D4D_COLOR_BLUE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; D4D_SetDefaultScheme(&amp;amp;ScreenColorSchemeMsg);&amp;nbsp; &lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/***********************************************************************/&lt;/P&gt;
&lt;P&gt;/* called periodically in each D4D_poll runs */&lt;/P&gt;
&lt;P&gt;static void Screenmsg_OnMain()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/***********************************************************************/&lt;/P&gt;
&lt;P&gt;/* called with each screen deactivation */&lt;/P&gt;
&lt;P&gt;static void Screenmsg_OnDeactivate()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/***********************************************************************/&lt;/P&gt;
&lt;P&gt;/* called with each internal message for this screen */&lt;/P&gt;
&lt;P&gt;static Byte Screenmsg_OnObjectMsg(D4D_MESSAGE* pMsg)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D4D_UNUSED(pMsg);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/***********************************************************************/&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 10:34:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/eGUI-main-screen-is-not-rewritten-after-return-from-activated/m-p/237404#M6629</guid>
      <dc:creator>robroz</dc:creator>
      <dc:date>2013-05-14T10:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: eGUI: main screen is not rewritten after return from activated screen</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/eGUI-main-screen-is-not-rewritten-after-return-from-activated/m-p/237405#M6630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the problem could be with redrawing the background of the screen, If you don't have filled all screen by any object, then then background of the screen MUST be draw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this is used macro in config:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Define a default flags &lt;/P&gt;&lt;P&gt;#define D4D_SCR_F_DEFAULT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (D4D_SCR_F_BCKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 07:52:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/eGUI-main-screen-is-not-rewritten-after-return-from-activated/m-p/237405#M6630</guid>
      <dc:creator>Gargy</dc:creator>
      <dc:date>2013-05-17T07:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: eGUI: main screen is not rewritten after return from activated screen</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/eGUI-main-screen-is-not-rewritten-after-return-from-activated/m-p/237406#M6631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for response...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By debugging I found the problem. It was a part of the code that did something on a NULL pointer in On_Activate method of the main screen. Thread was stopped at that error and main_screen was not redrawn...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My bad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Bul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 16:18:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/eGUI-main-screen-is-not-rewritten-after-return-from-activated/m-p/237406#M6631</guid>
      <dc:creator>robroz</dc:creator>
      <dc:date>2013-05-17T16:18:26Z</dc:date>
    </item>
  </channel>
</rss>

