📄 dialog_1000msgproc.c
字号:
/*******************************************************************************
* COPYRIGHT DaTang Mobile Communications Equipment CO.,LTD *
********************************************************************************
* Filename :
*
* Description:
* Notes : NA
*
*--------------------------------------------------------------------------------
* Change History:
*--------------------------------------------------------------------------------
*
*
*******************************************************************************/
#include "UIResource.h"
#include "TestControls.h"
#include <multimedia.h>
//小图标的logo图片大小为16*16 * 2 bytes/pixel
//白色方块
const static unsigned char bmp_app2_bits1 [] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};
//文本图标
const static unsigned char bmp_app2_bits2 [] = {
0x1f, 0xf8, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8,
0xe0, 0x60, 0xfd, 0xff, 0xfd, 0xff, 0xfd, 0xff, 0xfd, 0xff, 0xfd, 0xff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xf8, 0x1f, 0xf8,
0x1f, 0xf8, 0x1f, 0xf8, 0xe0, 0x60, 0x13, 0xf7, 0xe0, 0x60, 0xf9, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf7, 0xff, 0xf7, 0xff, 0x13, 0xf7, 0xe0, 0x60, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8,
0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0xe0, 0x60, 0xe0, 0x60, 0x13, 0xf7, 0x13, 0xf7, 0x13, 0xf7, 0x13, 0xf7, 0x13, 0xf7, 0x13, 0xf7, 0x13, 0xf7, 0xe0, 0x60, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8,
0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0xe0, 0x60, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8,
};
/*struct _BITMAP
{
Uint8 bmType;
Uint8 bmBitsPerPixel;
Uint8 bmBytesPerPixel;
Uint8 bmReserved;
Uint32 bmColorKey;
Uint32 bmWidth;
Uint32 bmHeight;
Uint32 bmPitch;
void* bmBits;
Uint32 bmReserved1;
};*/
const BITMAP bmp_text = {
0x10, 0x10, 0x02, 0x00,
0x0000f81f,
0x0000001D, 0x00000060, 0x00000020,
(void*)bmp_app2_bits1
};
const BITMAP bmp_text2 = {
0x10, 0x10, 0x02, 0x00,
0x0000f81f,
0x00000010, 0x00000010, 0x00000020,
(void*)bmp_app2_bits2
};
#define APP_NOTEPAD_STR N_("记事本") //Notepad
#define APP_NOTEPAD_STR_NO_NOTEPAD N_("空记录") //No Notepad
#define APP_NOTEPAD_STR_FULL N_("记录已满") //Full Notepad
#define APP_NOTEPAD_STR_NEW N_("新建") //New
#define APP_NOTEPAD_STR_VIEW N_("查看") //View
#define APP_NOTEPAD_STR_EDIT N_("编辑") //Edit
#define APP_NOTEPAD_STR_DELETE N_("删除") //Delete
#define APP_NOTEPAD_STR_DELETE_ALL N_("删除全部") //Delete All
#define APP_NOTEPAD_STR_SURE N_("确定删除吗?") //Sure to Delete?
#define APP_NOTEPAD_STR_FAIL_DELETE N_("删除失败!") //Fail to Delete!
#define APP_STR_SAVE N_("保存") //Save
#define APP_STR_OK N_("Ok") /*确定*/
#define APP_STR_CANCEL N_("Cancel") /*取消*/
#define APP_STR_YES N_("Yes") /*是*/
#define APP_STR_NO N_("No") /*否*/
#define APP_STR_SELECT N_("Select") /*选择*/
#define APP_STR_BACK N_("Back") /*返回*/
#define APP_STR_NULL N_(" ") /* */
#define APP_STR_OPTIONS N_("Options") /*选项*/
#define APP_STR_CLEAN N_("Clean_global")/*清除*/
app_TestControls g_app_TestControls;
HWND g_app_TestControls_list_hwnd;
SINT32 app_TestControls_create_edit(HWND hParentWnd, SINT32 index)
{
HWND hWnd = NULL;
/*Message map*/
BEGIN_STATIC_MSGMAP(main_wnd_maps)
END_STATIC_MSGMAP(main_wnd_maps)
hWnd = tp_resource_window_create(hParentWnd,
NULL,
&main_wnd_maps,
DIALOG_1000_PATH,
"Dialog_2",
(DWORD)index);
if ( HWND_INVALID == hWnd )
{
return APP_ERR_FAILURE;
}
return APP_ERR_SUCCESS;
}
SINT32 app_TestControls_create_menu(HWND hWnd, SINT32 index)
{
SINT32 num = 0;
HWND ret = HWND_INVALID;
/*message map*/
BEGIN_STATIC_MSGMAP(main_wnd_maps)
END_STATIC_MSGMAP(main_wnd_maps)
ListExItem main_item_a[] = {
{APP_NOTEPAD_STR_NEW,N_(""),&bmp_text2,0,0},
{APP_NOTEPAD_STR_VIEW,N_(""),&bmp_text2,1,1},
{APP_NOTEPAD_STR_EDIT,N_(""),&bmp_text2,2,2},
{APP_NOTEPAD_STR_DELETE,N_(""),&bmp_text2,3,3},
{APP_NOTEPAD_STR_DELETE_ALL,N_(""),&bmp_text2,4,4},
};
/*list item count*/
num = sizeof(main_item_a)/sizeof(main_item_a[0]);
/*create main window*/
ret = app_simple_list_create( hWnd,
APP_STR_OPTIONS,
APP_STR_SELECT,
APP_STR_BACK,
main_item_a,
num,
&main_wnd_maps,
(DWORD)index);
if ( HWND_INVALID == ret )
{
return APP_ERR_FAILURE;
}
return APP_ERR_SUCCESS;
}
/*********************************************************************************** Function: OnBnClked1003* Purpose: <describing what the function is to do> * Relation: <describing the name, version and position of protocols involved by * this function>* Params:* * Name Type In/Out Description * -------- ---- ------ ----------- * * Return: <comment on the returned values>* Note: <the limitations to use this function or other comments>***********************************************************************************/static SINT32 OnBnClked1003(HWND hWnd,WPARAM w,LPARAM l){
/************************************************************************/
HWND hSimpleEdit = HWND_INVALID;
HWND hMultiEdit = HWND_INVALID;
HWND hListEx = HWND_INVALID;
HWND hComboBox = HWND_INVALID;
static BOOL b = FALSE;
DLCITOR itor = INVALID_ITOR;
char *p = NULL;
BOOL isvisible = FALSE;
ListExItem item_st = {0};
CHAR text[20] = "ListItem内容";
SINT32 i = 0;
ListExSkin NewSkin = {0};
SKINTYPE skt = 0;
SINT32 nFlag = 0;
MAN_MM_AUDIO_PARAM mAuo;
MAN_MM_RAWDATA_TYPE mrawdata_mode;
static bPlay = TRUE;
hSimpleEdit = GetDlgItem(hWnd,IDC_SLEDIT_1002);
hMultiEdit = GetDlgItem(hWnd,IDC_MLEDIT_1004);
hListEx = GetDlgItem(hWnd,IDC_LISTCTRLEX_1005);
hComboBox = GetDlgItem(hWnd,IDC_COMBOBOX_1009);
if (HWND_INVALID == hSimpleEdit || HWND_INVALID == hMultiEdit)
{
return -1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -