📄 win_chkoverflowmesg.c
字号:
/*win_chkOverFlowMesg.c*//*** COMPANY NAME: 国星** FILE NAME: win_OverFlow.c** FILE PATH: Interface/win_OverFlow.c** WINDOWS NAME: 通信 ** WINDOWS PATH: 通信 / 发件箱(收件箱) / 查看** OTHER INFORMATION; 无** CREATER NAME: LiWencheng,JiangYuanqing** MENDER NAME: LiWencheng,JiangYuanqing** CHANGE TIME: 11/14/2007 */#include "sysSrcInfo.h"#define ID_EDIT_SEND 310#define ID_EDIT_TIME 320#define ID_EDIT_MLEDIT 330#define HWND_OverFlow 340static HWND hIconView_OverFlow;static HWND hwndEditSend,hwndEditTime;static HWND hwndmledit_content;static BITMAP bmp_OverFlow; static HWND editCodeType;static const char *bmp_name_OverFlow[] = {"./Pictures/b_windowsbackground_1.PNG", //第一张来做主界面"./Pictures/c_hide.PNG", //1"./Pictures/c_hide.PNG", //2"./Pictures/return.PNG" //3};static skin_item_t skin_main_items [] ={{SIID_OK, SI_TYPE_CHKBUTTON | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE, BUTTONLEFT_X, BUTTON_Y, {}, 1 ,"" },{SIID_MENU, SI_TYPE_CHKBUTTON | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE, BUTTONCENTER_X, BUTTON_Y, {}, 2, "" },{SIID_RETURN, SI_TYPE_CHKBUTTON | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE, BUTTONRIGHT_X, BUTTON_Y, {}, 3, "" }};/* 定义皮肤 */static skin_head_t skin_OverFlow ={ "main", //const BITMAP* bmps; SKIN_STYLE_TOOLTIP, NULL, NULL, 0, 3, skin_main_items, FALSE /** The number of the items in this skin. */ /* 定义皮肤元素数组 */};static void showmess (){ char buff[20]; SetCodeType (editCodeType , (int)(overFlowMesg->chType) - 31 ); sprintf (buff,"%ld",overFlowMesg->srcID); SetWindowText (hwndEditSend,buff); sprintf (buff,"%d-%d-%d %d:%d",currTime.year,currTime.mon,currTime.mday, overFlowMesg->hour, overFlowMesg->minute); SetWindowText (hwndEditTime, buff); SetWindowText (hwndmledit_content, overFlowMesg->message ); }static void CloseWindow_OverFlow(){ ShowWindow ( hWndMain_OverFlow, SW_HIDE); LoadSkinBmps( &skin_OverFlow, FALSE ,bmp_name_OverFlow , (sizeof (bmp_name_OverFlow))/sizeof(char *) ); UnloadBitmap( &bmp_OverFlow); }static int main_event_cb_OverFlow (HWND hwnd, skin_item_t* item, int event, void* data){ if (event == SIE_BUTTON_CLICKED) { switch (item->id) { //按的那个图片 case SIID_RETURN: win_index (hWndMain); CloseWindow_OverFlow(); break; } } return 1;}static void creat_windows(HWND hwnd ){ hwndEditSend = CreateWindow( CTRL_SLEDIT, //sendNO " ", WS_VISIBLE | WS_CHILD | WS_BORDER |ES_READONLY ,// | ES_AUTOWRAP, ID_EDIT_SEND, 35, 21,124 , 17, hwnd, 0); hwndEditTime = CreateWindow( CTRL_SLEDIT, //time " ", WS_VISIBLE | WS_CHILD | WS_BORDER |ES_READONLY |ES_READONLY,// | ES_AUTOWRAP, ID_EDIT_TIME, 35, 37,124 , 17, hwnd, 0); hwndmledit_content=CreateWindow( CTRL_MLEDIT, //content "", WS_VISIBLE | WS_BORDER | WS_VSCROLL | ES_AUTOWRAP |ES_READONLY , ID_EDIT_MLEDIT, 0, 53,157 , 114, hwnd, 0);}static int msg_event_cb_OverFlow (HWND hwnd, int message, WPARAM wparam, LPARAM lparam, int* result){ HDC hdc; int i=0; switch (message) { case MSG_CREATE: LoadBitmap (HDC_SCREEN, &bmp_OverFlow, "./Pictures/a_information_3.PNG"); /// creat_windows( hwnd ); showmess (); break; case MSG_PAINT : hdc=BeginPaint (hwnd); SetBkMode (hdc, BM_TRANSPARENT); FillBoxWithBitmap (hdc, ZTL_PIC_X,ZTL_PIC_Y, ZTL_PIC_W,ZTL_PIC_H, &bmp_OverFlow); TextOut (hdc, WZ_ZTL_X4, WZ_ZTL_Y, "Check" ); TextOut (hdc, RJ_X, WZ_ZTL_Y+35, "Time" ); TextOut (hdc, RJ_X, WZ_ZTL_Y+18, "Sender" ); EndPaint (hwnd,hdc); break; case MSG_OVERFLOWMESG: CloseWindow_OverFlow(); break; } return 1;}int win_chkOverFlowMesg (HWND hwnd , int flag){ LoadSkinBmps( &skin_OverFlow, TRUE ,bmp_name_OverFlow , (sizeof (bmp_name_OverFlow))/sizeof(char *) ); if (skin_OverFlow.bmps == NULL) { printf ("Could not load skin bitmaps!\n"); return 3; } //定义的皮肤,皮肤事件回调函数,皮肤窗口消息回调函数 if ( !skin_init (&skin_OverFlow, main_event_cb_OverFlow, msg_event_cb_OverFlow) ){ /* 初始化皮肤 */ printf ("skin init fail!\n"); return 4; } else{ hWndMain_OverFlow = create_skin_control (&skin_OverFlow, hwnd,HWND_OverFlow,DEF_X_, DEF_Y_, DEF_WIDTH, DEF_HEIGHT); SetFocusChild(hIconView_OverFlow); currShowWindowHwnd = hWndMain_OverFlow; return 1; }}#ifndef _LITE_VERSION#include <minigui/dti.c>#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -