硬汉嵌入式论坛

 找回密码
 立即注册
查看: 2107|回复: 6
收起左侧

[emWin] 求助,新手上路准备做一个键盘,遇到问题了

[复制链接]

3

主题

22

回帖

31

积分

新手上路

积分
31
发表于 2019-5-21 17:49:31 | 显示全部楼层 |阅读模式
本帖最后由 天涯海角 于 2019-5-22 08:38 编辑

初步设想是点edit控件,会弹出数字键盘。
edit控件和键盘控件不在同一个界面,初始化创建两个界面,隐藏键盘控件。在程序中设计点到edit控件弹出键盘,不知为何,键盘弹不出来。下载文件为仿真文件,麻烦帮忙看看是什么问题
09-SeggerEval_WIN32_MSVC_MinGW_GUI_V528键盘测试.zip (15.37 MB, 下载次数: 8)
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115778
QQ
发表于 2019-5-22 09:36:29 | 显示全部楼层
仅发你做的emWin部分就行。
回复

使用道具 举报

3

主题

22

回帖

31

积分

新手上路

积分
31
 楼主| 发表于 2019-5-22 10:29:24 | 显示全部楼层
eric2013 发表于 2019-5-22 09:36
仅发你做的emWin部分就行。

这是界面1
  1. /*********************************************************************
  2. *                                                                    *
  3. *                SEGGER Microcontroller GmbH & Co. KG                *
  4. *        Solutions for real time microcontroller applications        *
  5. *                                                                    *
  6. **********************************************************************
  7. *                                                                    *
  8. * C-file generated by:                                               *
  9. *                                                                    *
  10. *        GUI_Builder for emWin version 5.32                          *
  11. *        Compiled Oct  8 2015, 11:59:02                              *
  12. *        (c) 2015 Segger Microcontroller GmbH & Co. KG               *
  13. *                                                                    *
  14. **********************************************************************
  15. *                                                                    *
  16. *        Internet: www.segger.com  Support: support@segger.com       *
  17. *                                                                    *
  18. **********************************************************************
  19. */

  20. // USER START (Optionally insert additional includes)
  21. // USER END

  22. #include "DIALOG.h"
  23. #include "string.h"
  24. #include "stdio.h"


  25. /*********************************************************************
  26. *
  27. *       Defines
  28. *
  29. **********************************************************************
  30. */
  31. #define ID_FRAMEWIN_0 (GUI_ID_USER + 0x00)
  32. #define ID_EDIT_0 (GUI_ID_USER + 0x01)
  33. #define ID_EDIT_1 (GUI_ID_USER + 0x02)
  34. #define ID_TEXT_0 (GUI_ID_USER + 0x04)
  35. #define ID_TEXT_1 (GUI_ID_USER + 0x05)


  36. // USER START (Optionally insert additional defines)
  37. // USER END

  38. /*********************************************************************
  39. *
  40. *       Static data
  41. *
  42. **********************************************************************
  43. */

  44. // USER START (Optionally insert additional static data)
  45. // USER END

  46. /*********************************************************************
  47. *
  48. *       _aDialogCreate
  49. */
  50. static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
  51.   { FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 1, 0, 800, 480, 0, 0x0, 0 },
  52.   { EDIT_CreateIndirect, "Edit", ID_EDIT_0, 120, 30, 80, 20, 0, 0x64, 0 },
  53.   { EDIT_CreateIndirect, "Edit", ID_EDIT_1, 120, 59, 80, 20, 0, 0x64, 0 },
  54.   { TEXT_CreateIndirect, "NUM1", ID_TEXT_0, 77, 30, 34, 20, 0, 0x0, 0 },
  55.   { TEXT_CreateIndirect, "NUM2", ID_TEXT_1, 75, 60, 32, 20, 0, 0x0, 0 },
  56.   // USER START (Optionally insert additional widgets)
  57.   // USER END
  58. };
  59. extern WM_HWIN hPage[4];
  60. /*********************************************************************
  61. *
  62. *       Static code
  63. *
  64. **********************************************************************
  65. */

  66. // USER START (Optionally insert additional static code)
  67. // USER END

  68. /*********************************************************************
  69. *
  70. *       _cbDialog
  71. */
  72. static void _cbDialog(WM_MESSAGE * pMsg) {
  73.   WM_HWIN hItem;
  74.   int     NCode;
  75.   int     Id;
  76.         char ch[10];
  77.         int x=666;
  78.   // USER START (Optionally insert additional variables)
  79.   // USER END

  80.   switch (pMsg->MsgId) {
  81.   case WM_INIT_DIALOG://初始化消息,创建窗口/控件时有效,比如在这里设置一些控件的初始参数

  82.     //
  83.     // Initialization of 'Edit'
  84.     //
  85.     hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0);
  86.           sprintf(ch,"%d",(char*)x);
  87.     EDIT_SetText(hItem, ch);
  88.     //
  89.     // Initialization of 'Edit'
  90.     //
  91.     hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_1);
  92.     EDIT_SetText(hItem, "0");
  93.     // USER START (Optionally insert additional code for further widget initialization)
  94.     // USER END
  95.     break;
  96.   case WM_NOTIFY_PARENT://操作触发消息处理(操作屏幕程序会跑到这里),比如点击按键、点击编辑框(任何的操作)等等......
  97.     Id    = WM_GetId(pMsg->hWinSrc);
  98.     NCode = pMsg->Data.v;
  99.     switch(Id) {
  100.     case ID_EDIT_0: // Notifications sent by 'Edit'
  101.       switch(NCode) {
  102.       case WM_NOTIFICATION_CLICKED://EDIT_0被选中显示键盘
  103.         // USER START (Optionally insert code for reacting on notification message)
  104. //                        WM_HideWindow(hPage[0]);       
  105.                   WM_HideWindow(hPage[0]);
  106.                   WM_ShowWindow(hPage[1]);
  107.                        
  108.                        
  109.         // USER END
  110.         break;
  111.       case WM_NOTIFICATION_RELEASED:
  112.         // USER START (Optionally insert code for reacting on notification message)
  113.                   WM_HideWindow(hPage[0]);
  114.                   WM_ShowWindow(hPage[1]);
  115.                   WM_SetFocus(hPage[1]);
  116.                
  117.         // USER END
  118.         break;
  119.       case WM_NOTIFICATION_VALUE_CHANGED:
  120.         // USER START (Optionally insert code for reacting on notification message)
  121.         // USER END
  122.         break;
  123.       // USER START (Optionally insert additional code for further notification handling)
  124.       // USER END
  125.       }
  126.       break;
  127.     case ID_EDIT_1: // Notifications sent by 'Edit'//点击编辑框,打开键盘
  128.       switch(NCode) {
  129.       case WM_NOTIFICATION_CLICKED:
  130.         // USER START (Optionally insert code for reacting on notification message)

  131.         // USER END
  132.         break;
  133.       case WM_NOTIFICATION_RELEASED:
  134.         // USER START (Optionally insert code for reacting on notification message)
  135.                 //  WM_HideWindow(hPage[0]);
  136.                   WM_ShowWindow(hPage[1]);
  137.         // USER END
  138.         break;
  139.       case WM_NOTIFICATION_VALUE_CHANGED:
  140.         // USER START (Optionally insert code for reacting on notification message)
  141.         // USER END
  142.         break;
  143.       // USER START (Optionally insert additional code for further notification handling)
  144.       // USER END
  145.       }
  146.       break;
  147.     // USER START (Optionally insert additional code for further Ids)
  148.     // USER END
  149.     }
  150.     break;
  151.   // USER START (Optionally insert additional message handling)
  152.   // USER END
  153.   default:
  154.     WM_DefaultProc(pMsg);
  155.     break;
  156.   }
  157. }

  158. /*********************************************************************
  159. *
  160. *       Public code
  161. *
  162. **********************************************************************
  163. */
  164. /*********************************************************************
  165. *
  166. *       CreateFramewin
  167. */
  168. WM_HWIN CreateFramewin(void);
  169. WM_HWIN CreateFramewin(void) {
  170.   WM_HWIN hWin;

  171.   hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
  172.   return hWin;
  173. }

  174. // USER START (Optionally insert additional public code)
  175. // USER END

  176. /*************************** End of file ****************************/


  177. //void ButtonUse_Demo(void)
  178. //{
  179. //        WM_HWIN hWin;
  180. //        hWin=CreateFramewin();
  181. //        while(1)
  182. //        {
  183. //                GUI_Delay(100);

  184. //        }
  185. //}


复制代码
这是界面2
  1. /*********************************************************************
  2. *                                                                    *
  3. *                SEGGER Microcontroller GmbH & Co. KG                *
  4. *        Solutions for real time microcontroller applications        *
  5. *                                                                    *
  6. **********************************************************************
  7. *                                                                    *
  8. * C-file generated by:                                               *
  9. *                                                                    *
  10. *        GUI_Builder for emWin version 5.32                          *
  11. *        Compiled Oct  8 2015, 11:59:02                              *
  12. *        (c) 2015 Segger Microcontroller GmbH & Co. KG               *
  13. *                                                                    *
  14. **********************************************************************
  15. *                                                                    *
  16. *        Internet: www.segger.com  Support: support@segger.com       *
  17. *                                                                    *
  18. **********************************************************************
  19. */

  20. // USER START (Optionally insert additional includes)
  21. // USER END

  22. #include "DIALOG.h"

  23. /*********************************************************************
  24. *
  25. *       Defines
  26. *
  27. **********************************************************************
  28. */
  29. #define ID_FRAMEWIN_0 (GUI_ID_USER + 0x00)
  30. #define ID_BUTTON_0 (GUI_ID_USER + 0x01)
  31. #define ID_BUTTON_1 (GUI_ID_USER + 0x03)
  32. #define ID_BUTTON_2 (GUI_ID_USER + 0x04)
  33. #define ID_BUTTON_3 (GUI_ID_USER + 0x05)
  34. #define ID_BUTTON_4 (GUI_ID_USER + 0x06)
  35. #define ID_BUTTON_5 (GUI_ID_USER + 0x07)
  36. #define ID_BUTTON_6 (GUI_ID_USER + 0x08)
  37. #define ID_BUTTON_7 (GUI_ID_USER + 0x09)
  38. #define ID_BUTTON_8 (GUI_ID_USER + 0x0A)
  39. #define ID_BUTTON_9 (GUI_ID_USER + 0x0B)
  40. #define ID_BUTTON_10 (GUI_ID_USER + 0x0C)
  41. #define ID_BUTTON_11 (GUI_ID_USER + 0x0D)
  42. #define ID_BUTTON_12 (GUI_ID_USER + 0x0E)
  43. #define ID_EDIT_0 (GUI_ID_USER + 0x10)


  44. // USER START (Optionally insert additional defines)
  45. // USER END

  46. /*********************************************************************
  47. *
  48. *       Static data
  49. *
  50. **********************************************************************
  51. */

  52. // USER START (Optionally insert additional static data)
  53. // USER END

  54. /*********************************************************************
  55. *
  56. *       _aDialogCreate
  57. */
  58. static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
  59.   { FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 45, 15, 275, 166, 0, 0x0, 0 },
  60.   { BUTTON_CreateIndirect, "ESC", ID_BUTTON_0, 5, 110, 60, 30, 0, 0x0, 0 },
  61.   { BUTTON_CreateIndirect, "2", ID_BUTTON_1, 75, 4, 60, 30, 0, 0x0, 0 },
  62.   { BUTTON_CreateIndirect, "1", ID_BUTTON_2, 5, 5, 60, 30, 0, 0x0, 0 },
  63.   { BUTTON_CreateIndirect, "4", ID_BUTTON_3, 4, 40, 60, 30, 0, 0x0, 0 },
  64.   { BUTTON_CreateIndirect, "Back", ID_BUTTON_4, 140, 109, 60, 30, 0, 0x0, 0 },
  65.   { BUTTON_CreateIndirect, "7", ID_BUTTON_5, 5, 75, 60, 30, 0, 0x0, 0 },
  66.   { BUTTON_CreateIndirect, "0", ID_BUTTON_6, 75, 109, 60, 30, 0, 0x0, 0 },
  67.   { BUTTON_CreateIndirect, "5", ID_BUTTON_7, 75, 38, 60, 30, 0, 0x0, 0 },
  68.   { BUTTON_CreateIndirect, "9", ID_BUTTON_8, 140, 72, 60, 30, 0, 0x0, 0 },
  69.   { BUTTON_CreateIndirect, "3", ID_BUTTON_9, 140, 3, 60, 30, 0, 0x0, 0 },
  70.   { BUTTON_CreateIndirect, "8", ID_BUTTON_10, 75, 74, 60, 30, 0, 0x0, 0 },
  71.   { BUTTON_CreateIndirect, "Enter", ID_BUTTON_11, 204, 42, 55, 94, 0, 0x0, 0 },
  72.   { BUTTON_CreateIndirect, "6", ID_BUTTON_12, 140, 38, 60, 30, 0, 0x0, 0 },
  73.   { EDIT_CreateIndirect, "Edit", ID_EDIT_0, 210, 9, 52, 20, 0, 0x64, 0 },
  74.   // USER START (Optionally insert additional widgets)
  75.   // USER END
  76. };


  77. /*********************************************************************
  78. *
  79. *       Static code
  80. *
  81. **********************************************************************
  82. */

  83. // USER START (Optionally insert additional static code)
  84. extern WM_HWIN hPage[4];
  85. char buff[20] = { "0" };
  86. int j = 0;
  87. // USER END

  88. /*********************************************************************
  89. *
  90. *       _cbDialog
  91. */
  92. static void _cbDialog(WM_MESSAGE * pMsg) {
  93.   WM_HWIN hItem;
  94.   int     NCode;
  95.   int     Id;
  96.   int i;
  97.   // USER START (Optionally insert additional variables)
  98.   // USER END

  99.   switch (pMsg->MsgId) {
  100.   case WM_INIT_DIALOG:
  101.     //
  102.     // Initialization of 'Edit'

  103.           for (i = ID_BUTTON_0; i <= ID_BUTTON_12; i++)//禁止聚焦
  104.                   BUTTON_SetFocussable(WM_GetDialogItem(pMsg->hWin, i), 0);
  105.     //
  106.     hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0);
  107.     EDIT_SetText(hItem, "0");
  108.     // USER START (Optionally insert additional code for further widget initialization)
  109.        
  110.        
  111.     // USER END
  112.     break;
  113.   case WM_NOTIFY_PARENT: //执行屏幕操作
  114.     Id    = WM_GetId(pMsg->hWinSrc);
  115.     NCode = pMsg->Data.v;
  116.     switch(Id) {
  117.     case ID_BUTTON_0: // Notifications sent by 'ESC'
  118.       switch(NCode) {
  119.       case WM_NOTIFICATION_CLICKED:
  120.         // USER START (Optionally insert code for reacting on notification message)
  121.                   WM_HideWindow(hPage[1]);
  122.         // USER END
  123.         break;
  124.       case WM_NOTIFICATION_RELEASED:
  125.         // USER START (Optionally insert code for reacting on notification message)
  126.         // USER END
  127.         break;
  128.       // USER START (Optionally insert additional code for further notification handling)
  129.       // USER END
  130.       }
  131.       break;
  132.     case ID_BUTTON_1: // Notifications sent by '2'
  133.       switch(NCode) {
  134.       case WM_NOTIFICATION_CLICKED:
  135.         // USER START (Optionally insert code for reacting on notification message)
  136.                   BUTTON_GetText(pMsg->hWinSrc, &buff[j], sizeof(buff));
  137.                   j++;
  138.         // USER END
  139.         break;
  140.       case WM_NOTIFICATION_RELEASED:
  141.         // USER START (Optionally insert code for reacting on notification message)
  142.         // USER END
  143.         break;
  144.       // USER START (Optionally insert additional code for further notification handling)
  145.       // USER END
  146.       }
  147.       break;
  148.     case ID_BUTTON_2: // Notifications sent by '1'
  149.       switch(NCode) {
  150.       case WM_NOTIFICATION_CLICKED:
  151.         // USER START (Optionally insert code for reacting on notification message)
  152.         // USER END
  153.         break;
  154.       case WM_NOTIFICATION_RELEASED:
  155.         // USER START (Optionally insert code for reacting on notification message)
  156.         // USER END
  157.         break;
  158.       // USER START (Optionally insert additional code for further notification handling)
  159.       // USER END
  160.       }
  161.       break;
  162.     case ID_BUTTON_3: // Notifications sent by '4'
  163.       switch(NCode) {
  164.       case WM_NOTIFICATION_CLICKED:
  165.         // USER START (Optionally insert code for reacting on notification message)
  166.         // USER END
  167.         break;
  168.       case WM_NOTIFICATION_RELEASED:
  169.         // USER START (Optionally insert code for reacting on notification message)
  170.         // USER END
  171.         break;
  172.       // USER START (Optionally insert additional code for further notification handling)
  173.       // USER END
  174.       }
  175.       break;
  176.     case ID_BUTTON_4: // Notifications sent by 'Back'
  177.       switch(NCode) {
  178.       case WM_NOTIFICATION_CLICKED:
  179.         // USER START (Optionally insert code for reacting on notification message)
  180.           memset(buff, 0, 10);  //清空数组                               
  181.           GUI_SendKeyMsg(GUI_KEY_BACKSPACE, 1);
  182.         // USER END
  183.         break;
  184.       case WM_NOTIFICATION_RELEASED:
  185.         // USER START (Optionally insert code for reacting on notification message)
  186.         // USER END
  187.         break;
  188.       // USER START (Optionally insert additional code for further notification handling)
  189.       // USER END
  190.       }
  191.       break;
  192.     case ID_BUTTON_5: // Notifications sent by '7'
  193.       switch(NCode) {
  194.       case WM_NOTIFICATION_CLICKED:
  195.         // USER START (Optionally insert code for reacting on notification message)
  196.         // USER END
  197.         break;
  198.       case WM_NOTIFICATION_RELEASED:
  199.         // USER START (Optionally insert code for reacting on notification message)
  200.         // USER END
  201.         break;
  202.       // USER START (Optionally insert additional code for further notification handling)
  203.       // USER END
  204.       }
  205.       break;
  206.     case ID_BUTTON_6: // Notifications sent by '0'
  207.       switch(NCode) {
  208.       case WM_NOTIFICATION_CLICKED:
  209.         // USER START (Optionally insert code for reacting on notification message)
  210.         // USER END
  211.         break;
  212.       case WM_NOTIFICATION_RELEASED:
  213.         // USER START (Optionally insert code for reacting on notification message)
  214.         // USER END
  215.         break;
  216.       // USER START (Optionally insert additional code for further notification handling)
  217.       // USER END
  218.       }
  219.       break;
  220.     case ID_BUTTON_7: // Notifications sent by '5'
  221.       switch(NCode) {
  222.       case WM_NOTIFICATION_CLICKED:
  223.         // USER START (Optionally insert code for reacting on notification message)
  224.         // USER END
  225.         break;
  226.       case WM_NOTIFICATION_RELEASED:
  227.         // USER START (Optionally insert code for reacting on notification message)
  228.         // USER END
  229.         break;
  230.       // USER START (Optionally insert additional code for further notification handling)
  231.       // USER END
  232.       }
  233.       break;
  234.     case ID_BUTTON_8: // Notifications sent by '9'
  235.       switch(NCode) {
  236.       case WM_NOTIFICATION_CLICKED:
  237.         // USER START (Optionally insert code for reacting on notification message)
  238.         // USER END
  239.         break;
  240.       case WM_NOTIFICATION_RELEASED:
  241.         // USER START (Optionally insert code for reacting on notification message)
  242.         // USER END
  243.         break;
  244.       // USER START (Optionally insert additional code for further notification handling)
  245.       // USER END
  246.       }
  247.       break;
  248.     case ID_BUTTON_9: // Notifications sent by '3'
  249.       switch(NCode) {
  250.       case WM_NOTIFICATION_CLICKED:
  251.         // USER START (Optionally insert code for reacting on notification message)
  252.         // USER END
  253.         break;
  254.       case WM_NOTIFICATION_RELEASED:
  255.         // USER START (Optionally insert code for reacting on notification message)
  256.         // USER END
  257.         break;
  258.       // USER START (Optionally insert additional code for further notification handling)
  259.       // USER END
  260.       }
  261.       break;
  262.     case ID_BUTTON_10: // Notifications sent by '8'
  263.       switch(NCode) {
  264.       case WM_NOTIFICATION_CLICKED:
  265.         // USER START (Optionally insert code for reacting on notification message)
  266.         // USER END
  267.         break;
  268.       case WM_NOTIFICATION_RELEASED:
  269.         // USER START (Optionally insert code for reacting on notification message)
  270.         // USER END
  271.         break;
  272.       // USER START (Optionally insert additional code for further notification handling)
  273.       // USER END
  274.       }
  275.       break;
  276.     case ID_BUTTON_11: // Notifications sent by 'Enter'
  277.       switch(NCode) {
  278.       case WM_NOTIFICATION_CLICKED:
  279.         // USER START (Optionally insert code for reacting on notification message)
  280.                 for (j = 0; buff[j] != '\0'; j++)
  281.                          GUI_SendKeyMsg(buff[j], 1);//1则表示按键被按下
  282.         // USER END
  283.         break;
  284.       case WM_NOTIFICATION_RELEASED:
  285.         // USER START (Optionally insert code for reacting on notification message)
  286.                         WM_HideWindow(hPage[1]);       
  287. //                        WM_ShowWindow(hPage[0]);
  288.         // USER END
  289.         break;
  290.       // USER START (Optionally insert additional code for further notification handling)
  291.       // USER END
  292.       }
  293.       break;
  294.     case ID_BUTTON_12: // Notifications sent by '6'
  295.       switch(NCode) {
  296.       case WM_NOTIFICATION_CLICKED:
  297.         // USER START (Optionally insert code for reacting on notification message)
  298.         // USER END
  299.         break;
  300.       case WM_NOTIFICATION_RELEASED:
  301.         // USER START (Optionally insert code for reacting on notification message)
  302.         // USER END
  303.         break;
  304.       // USER START (Optionally insert additional code for further notification handling)
  305.       // USER END
  306.       }
  307.       break;
  308.     case ID_EDIT_0: // Notifications sent by 'Edit'
  309.       switch(NCode) {
  310.       case WM_NOTIFICATION_CLICKED:
  311.         // USER START (Optionally insert code for reacting on notification message)


  312.         // USER END
  313.         break;
  314.       case WM_NOTIFICATION_RELEASED:
  315.         // USER START (Optionally insert code for reacting on notification message)
  316.         // USER END
  317.         break;
  318.       case WM_NOTIFICATION_VALUE_CHANGED:
  319.         // USER START (Optionally insert code for reacting on notification message)
  320.         // USER END
  321.         break;
  322.       // USER START (Optionally insert additional code for further notification handling)
  323.       // USER END
  324.       }
  325.       break;
  326.     // USER START (Optionally insert additional code for further Ids)
  327.     // USER END
  328.     }
  329.     break;
  330.   // USER START (Optionally insert additional message handling)
  331.   // USER END
  332.   default:
  333.     WM_DefaultProc(pMsg);
  334.     break;
  335.   }
  336. }

  337. /*********************************************************************
  338. *
  339. *       Public code
  340. *
  341. **********************************************************************
  342. */
  343. /*********************************************************************
  344. *
  345. *       CreateFramewin//创建一个对话框
  346. */
  347. WM_HWIN CreateFramewin_k(void);
  348. WM_HWIN CreateFramewin_k(void) {
  349.   WM_HWIN hWin;

  350.   hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
  351.   return hWin;
  352. }
复制代码
下面是启动部分
  1. #include "dialog.h"


  2. WM_HWIN hPage[4];
  3. //CreateFramewin
  4. void MainTask(void)
  5. {
  6.     GUI_Init();                                                                        //初始化emWin/ucGUI
  7.         hPage[0] = CreateFramewin(WM_HBKWIN);                //创建窗体,父窗体是桌面背景
  8.         hPage[1] = CreateFramewin_k(WM_HBKWIN);                //创建窗体,父窗体
  9.    WM_HideWindow(hPage[1]);                                        //隐藏Page
  10.    

  11.     while(1) {GUI_Delay(20);}                                        //调用GUI_Delay函数延时20MS(最终目的是调用GUI_Exec()函数)
  12. }
复制代码
麻烦硬汉大哥帮忙看看是哪的问题





回复

使用道具 举报

3

主题

22

回帖

31

积分

新手上路

积分
31
 楼主| 发表于 2019-5-22 16:08:30 | 显示全部楼层
我好像混淆了窗口和FREMEIN。。。
回复

使用道具 举报

3

主题

22

回帖

31

积分

新手上路

积分
31
 楼主| 发表于 2019-5-22 20:26:44 | 显示全部楼层
eric2013 发表于 2019-5-22 09:36
仅发你做的emWin部分就行。

可能是句柄保存的问题
回复

使用道具 举报

3

主题

22

回帖

31

积分

新手上路

积分
31
 楼主| 发表于 2019-5-22 20:35:37 | 显示全部楼层
eric2013 发表于 2019-5-22 09:36
仅发你做的emWin部分就行。

真是句柄保存出错了,数组乱定义,基本功不扎实导致的问题
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115778
QQ
发表于 2019-5-23 10:22:56 | 显示全部楼层
天涯海角 发表于 2019-5-22 20:35
真是句柄保存出错了,数组乱定义,基本功不扎实导致的问题

好的,解决了就好
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-5-18 06:03 , Processed in 0.254691 second(s), 27 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表