Switchbetween two dialog created from GUIBuilder

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Switchbetween two dialog created from GUIBuilder

      HI to all,

      I have designe two different dialog in GUIBuilder ( I use the STemWin so GUIBuilder is mandatory).

      I need to switch to the second screen by pressing a butto on first screen.

      AS I see in this example (How to select correct function when switch windows) it is possible by using

      Source Code

      1. WM_DeleteWindow(pMsg->hWin);
      2. WM_CreateWindowAsChild(0, 0, LCD_GetXSize(), LCD_GetYSize(), WM_HBKWIN, WM_CF_SHOW, _cbWin0, 0);

      But the two dialog are in different .c files and share the same widget's ID (GUIBuilder design two separate file).


      Can I use after WM_DeleteWindows(pMsg->hWin); the function "WM_HWIN CreateScreen_Data(void)" generated from Guibuilder for the second screen ?


      There is a more correct way to accomplish my task ?

      Thanks.

      EDIT: this way works. So the question remain: "Is the correct way ? "

      The post was edited 1 time, last by ter2: Futher test executed. ().