看手册的时候有个皮肤设置,但是我无论怎么改都没变,求指导了,我设置皮肤在哪设置,初始化画窗口的时候还是创建之后,还是创建之前,代码如下:
[mw_shl_code=c,true]void Init_Calculator(WM_MESSAGE * pMsg)
{
WM_HWIN hWin = pMsg->hWin;
//
//FRAMEWIN
//
FRAMEWIN_SetBarColor(hWin,1,0x998877);
FRAMEWIN_SetClientColor(hWin,0x998877);
FRAMEWIN_SetTextColor(hWin,0x2222b2);
FRAMEWIN_SetFont(hWin,&GUI_Font32B_ASCII);
FRAMEWIN_SetTextAlign(hWin,GUI_TA_VCENTER|GUI_TA_CENTER);
FRAMEWIN_AddCloseButton(hWin, FRAMEWIN_BUTTON_RIGHT, 0);
FRAMEWIN_SetTitleHeight(hWin,32);
//
// BUTTON_SetDefaultSkin(BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX));
//GUI_ID_BUTTON0
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON0),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON0),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON0),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON0),&GUI_FontD60x80);
//
//GUI_ID_BUTTON1
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),BUTTON_CI_UNPRESSED,0xff0000);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON2
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),BUTTON_CI_UNPRESSED,0xff0000);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),&GUI_FontD60x80);
//
//GUI_ID_BUTTON3
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON3),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON3),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON3),BUTTON_CI_UNPRESSED,0x0000ff);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON3),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON4
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON4),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON4),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON4),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON4),&GUI_FontD60x80);
//
//GUI_ID_BUTTON5
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON5),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON5),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON5),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON5),&GUI_FontD60x80);
//
//GUI_ID_BUTTON6
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON6),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON6),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON6),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON6),&GUI_FontD60x80);
//
//GUI_ID_BUTTON7
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON7),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON7),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON7),BUTTON_CI_UNPRESSED,0xff0000);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON7),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON8
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON8),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON8),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON8),BUTTON_CI_UNPRESSED,0xff0000);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON8),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON9
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON9),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON9),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON9),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON9),&GUI_FontD60x80);
//
//GUI_ID_BUTTON10
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON10),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON10),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON10),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON10),&GUI_FontD60x80);
//
//GUI_ID_BUTTON11
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON11),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON11),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON11),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON11),&GUI_FontD60x80);
//
//GUI_ID_BUTTON12
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON12),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON12),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON12),BUTTON_CI_UNPRESSED,0xff0000);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON12),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON13
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON13),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON13),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON13),BUTTON_CI_UNPRESSED,0xff0000);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON13),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON14
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON14),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON14),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON14),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON14),&GUI_FontD60x80);
//
//GUI_ID_BUTTON15
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON15),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON15),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON15),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON15),&GUI_FontD60x80);
//
//GUI_ID_BUTTON16
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON16),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON16),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON16),BUTTON_CI_UNPRESSED,0xaab220);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON16),&GUI_FontD60x80);
//
//GUI_ID_BUTTON17
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON17),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON17),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON17),BUTTON_CI_UNPRESSED,0x0000ff);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON17),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON18
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON18),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON18),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON18),BUTTON_CI_UNPRESSED,0x0000ff);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON18),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON19
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON19),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON19),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON19),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON19),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON20
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON20),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON20),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON20),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON20),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON21
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON21),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON21),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON21),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON21),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON22
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON22),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON22),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON22),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON22),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON23
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON23),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON23),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON23),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON23),&GUI_Font32B_ASCII);
//GUI_ID_BUTTON24
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON24),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON24),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON24),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON24),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON25
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON25),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON25),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON25),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON25),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON26
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON26),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON26),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON26),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON26),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON27
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON27),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON27),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON27),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON27),&GUI_Font32B_ASCII);
//
//GUI_ID_BUTTON28
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON28),BUTTON_CI_UNPRESSED,0xc0c0c0);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON28),BUTTON_CI_PRESSED,0xa9a9a9);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON28),BUTTON_CI_UNPRESSED,0xff9933);
BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON28),&GUI_Font32B_ASCII);
//
//BUTTON_SetSkin(WM_GetDialogItem(hWin,GUI_ID_BUTTON28),)
//GUI_ID_TEXT0
//
TEXT_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_TEXT0),0x696969);
TEXT_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_TEXT0),0x00ff00);
TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT0),&GUI_Font32B_ASCII);
TEXT_SetTextAlign(WM_GetDialogItem(hWin,GUI_ID_TEXT0),GUI_TA_VCENTER|GUI_TA_RIGHT);
}
[/mw_shl_code]
[mw_shl_code=c,true]void Calculator_MainTask(void) // 这个是计算器的任务函数
{
WIDGET_DRAW_ITEM_FUNC * pfOldbutton;
GUI_Init();
WM_SetDesktopColor(GUI_WHITE); /* Automacally update desktop window */
// WM_SetCreateFlags(WM_CF_MEMDEV); /* Use memory devices on all windows to avoid flicker */
//PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
//FRAMEWIN_SetDefaultSkin(FRAMEWIN_SKIN_FLEX);
//PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
//BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX);
//CHECKBOX_SetDefaultSkin(CHECKBOX_SKIN_FLEX);
//DROPDOWN_SetDefaultSkin(DROPDOWN_SKIN_FLEX);
//SCROLLBAR_SetDefaultSkin(SCROLLBAR_SKIN_FLEX);
//SLIDER_SetDefaultSkin(SLIDER_SKIN_FLEX);
//HEADER_SetDefaultSkin(HEADER_SKIN_FLEX);
//RADIO_SetDefaultSkin(RADIO_SKIN_FLEX);
// pfOldbutton = BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX);
// BUTTON_SetDefaultSkin (pfOldbutton);
while(1)
{
GUI_ExecDialogBox(_Calculator_Create, GUI_COUNTOF(_Calculator_Create), &Calculator_cbCallback, 0, 0, 0);
}
}[/mw_shl_code]
图片上传不了
|