中级会员
- 积分
- 328
- 金钱
- 328
- 注册时间
- 2013-4-22
- 在线时间
- 7 小时
|
楼主 |
发表于 2014-10-20 17:23:29
|
显示全部楼层
void Calculator_Init(void)
{
hFrame = FRAMEWIN_Create("QQ:1371995365", NULL, WM_CF_SHOW, 0, 0, 240,320);
FRAMEWIN_SetActive(hFrame, 1);
FRAMEWIN_SetMoveable(hFrame, 1);
FRAMEWIN_SetFont(hFrame, &GUI_Font16B_ASCII);
FRAMEWIN_SetTextColor(hFrame, GUI_RED);
FRAMEWIN_SetBarColor(hFrame, 0, GUI_GREEN);
FRAMEWIN_SetTextAlign(hFrame, GUI_TA_HCENTER);
FRAMEWIN_AddMaxButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 0);
FRAMEWIN_AddMinButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 1);
hButton1 = BUTTON_CreateAsChild(10,80,40, 40,hFrame,101,WM_CF_SHOW);
hButton2 = BUTTON_CreateAsChild(70,80,40, 40,hFrame,102,WM_CF_SHOW);
hButton3 = BUTTON_CreateAsChild(130,80,40, 40,hFrame,103,WM_CF_SHOW);
hButton4 = BUTTON_CreateAsChild(10,130,40, 40,hFrame,104,WM_CF_SHOW);
hButton5 = BUTTON_CreateAsChild(70,130,40, 40,hFrame,105,WM_CF_SHOW);
hButton6 = BUTTON_CreateAsChild(130,130,40, 40,hFrame,106,WM_CF_SHOW);
hButton7 = BUTTON_CreateAsChild(10,180,40, 40,hFrame,107,WM_CF_SHOW);
hButton8 = BUTTON_CreateAsChild(70,180,40, 40,hFrame,108,WM_CF_SHOW);
hButton9 = BUTTON_CreateAsChild(130,180,40, 40,hFrame,109,WM_CF_SHOW);
hButton0 = BUTTON_CreateAsChild(10,230,40, 40,hFrame,100,WM_CF_SHOW);
hButton_jia = BUTTON_CreateAsChild(190,130,40, 40,hFrame,110,WM_CF_SHOW);
hButton_jian = BUTTON_CreateAsChild(190,180,40, 40,hFrame,111,WM_CF_SHOW);
hButton_chen = BUTTON_CreateAsChild(190,230,40, 40,hFrame,112,WM_CF_SHOW);
hButton_chu = BUTTON_CreateAsChild(130,230,40, 40,hFrame,113,WM_CF_SHOW);
hButton_equal = BUTTON_CreateAsChild(190,280,40, 40,hFrame,114,WM_CF_SHOW);
hButton_backspace = BUTTON_CreateAsChild(190,80,40, 40,hFrame,112,WM_CF_SHOW);
hButton_dort = BUTTON_CreateAsChild(70,230,40, 40,hFrame,116,WM_CF_SHOW);
hButton_ac = BUTTON_CreateAsChild(10,280,40, 40,hFrame,117,WM_CF_SHOW);
hButton_clear = BUTTON_CreateAsChild(70,280,40, 40,hFrame,118,WM_CF_SHOW);
BUTTON_SetText(hButton0, "0");
BUTTON_SetText(hButton1, "1");
BUTTON_SetText(hButton2, "2");
BUTTON_SetText(hButton3, "3");
BUTTON_SetText(hButton4, "4");
BUTTON_SetText(hButton5, "5");
BUTTON_SetText(hButton6, "6");
BUTTON_SetText(hButton7, "7");
BUTTON_SetText(hButton8, "8");
BUTTON_SetText(hButton9, "9");
BUTTON_SetText(hButton_jia, "+");
BUTTON_SetText(hButton_jian, "-");
BUTTON_SetText(hButton_chen, "x");
BUTTON_SetText(hButton_chu, "/");
BUTTON_SetText(hButton_equal, "=");
BUTTON_SetText(hButton_ac, "AC");
BUTTON_SetText(hButton_dort, ".");
BUTTON_SetText(hButton_backspace, "Del");
BUTTON_SetText(hButton_clear, "Clr");
hEdit=EDIT_CreateAsChild(10, 30, 220, 40,hFrame, 119, WM_CF_SHOW, 20);
EDIT_SetDefaultTextAlign(GUI_TA_RIGHT);
EDIT_SetValue(hEdit,'0');
}
Calculator_Init(); //主页面的载入,这是我的按钮显示程序,我怀疑跟这段代码有关,可是不知道到底有什么关系,到底哪里有影响 |
|