#include<string.h>
#include<minigui/common.h>
#include<minigui/minigui.h>
#include<minigui/gdi.h>
#include<minigui/window.h>
#include<minigui/control.h>
#include "dbadd.h"
HWND hMainWnd;
//HWND hbutton1;
//HWND hbutton2;
//HWND hbutton3;
#define IDC_bianhao 508
#define IDC_edit1 509
#define IDC_name 510
#define IDC_edit2 511
#define IDC_dianhua 512
#define IDC_edit3 517
#define IDC_sex 513
#define IDC_edit4 515
#define IDC_address 516
#define IDC_edit5 518
#define IDC_bselect 519
#define IDC_badd 520
//#define IDC_edit6 525
//#define IDC_address2 526
//#define IDC_breturn 521
#define IDC_bdelete 522
//#define IDC_sreturn 513
/*对话框*/static DLGTEMPLATE MyDlgInput =
{
WS_BORDER | WS_CAPTION,
WS_EX_NONE,
130,120,400,300,
"仓管员信息添加表",
0,0,
12,NULL,
0
};
static CTRLDATA CtrlInitData[] =
{
{
"static",
WS_VISIBLE | SS_SIMPLE,
10,15,60,15,
IDC_bianhao,
"员工编号:",
0,
WS_EX_NONE
},
{
"edit",
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP,
85,15,80,25,
IDC_edit1,
"",
0,
WS_EX_NONE
},
{
"static",
WS_VISIBLE | SS_SIMPLE,
215,15,80,16,
IDC_sex,
"性别:",
0,
WS_EX_NONE
},
{
"edit",
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP,
300,15,80,25,
IDC_edit2,
"",
0,
WS_EX_NONE
},
{
"static",
WS_VISIBLE | SS_SIMPLE,
10,65,60,15,
IDC_name,
"姓名:",
0,
WS_EX_NONE
},
{
"edit",
WS_CHILD | WS_VISIBLE | WS_BORDER /*| /*ES_PASSWORD*/ | WS_TABSTOP,
85,65,80,25,
IDC_edit3,
"",
0,
WS_EX_NONE
},
{
"static",
WS_VISIBLE | SS_SIMPLE,
215,65,60,16,
IDC_dianhua,
"联系电话:",
0,
WS_EX_NONE
},
{
"edit",
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP,
300,65,80,25,
IDC_edit4,
"",
0,
WS_EX_NONE
},
{
"static",
WS_VISIBLE | SS_SIMPLE,
10,125,80,16,
IDC_address,
"地址:",
0,
WS_EX_NONE
},
{
"edit",
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP,
85,125,200,25,
IDC_edit5,
"",
0,
WS_EX_NONE
},
{
"button",
WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON,
55,200,80,25,
IDC_badd,
"添加",
0,
WS_EX_NONE
},
/*{
"button",
WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON,
125,300,60,25,
IDC_bselect,
"查询",
0,
WS_EX_NONE
},
{
"button",
WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON,
225,300,60,25,
IDC_bdelete,
"删除",
0,
WS_EX_NONE
},*/
{
"button",
WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON,
255,200,80,25,
IDCANCEL,
"返回",
0,
WS_EX_NONE
}
};
/*static void my_notif_proc (HWND hwnd, int id, int nc, DWORD add_data)
{
if (nc == BN_CLICKED) {
SetWindowText (GetDlgItem (GetParent (hwnd), IDC_PROMPT), prompts [id - IDC_LAMIAN]);
}
}*/
//static int DialogBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam)
static int TestMainWinProc8(HWND hDlg, int message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case MSG_INITDIALOG:
//{
//int i;
//for (i = IDC_LAMIAN; i <= IDC_SHUIJIAO; i++)
// SetNotificationCallback (GetDlgItem (hDlg, i), my_notif_proc);
//}
return 1;
case MSG_COMMAND:
switch (wParam) {
case IDC_badd: break;
case IDCANCEL:
// EndDialog (hDlg, wParam);
CreateThreadForMainWindow(&thread1, NULL, TestWindowMain1, 0);
break;
}
break;
}
return DefaultDialogProc (hDlg, message, wParam, lParam);
}
//int MiniGUIMain (int argc, const char* argv[])
void* TestWindowMain8(void* data)
{
#ifdef _LITE_VERSION
SetDesktopRect(0, 0, 1440, 900);
#endif
MyDlgInput.controls = CtrlInitData;
DialogBoxIndirectParam (&MyDlgInput, HWND_DESKTOP, TestMainWinProc8, 0L);
return 0;
}
#ifndef _LITE_VERSION
#include <minigui/dti.c>
#endif