中冶王英俊是哪里人:一个简单的C++程序

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 17:55:41
设计一个人事管理系统
要求主要功能
1、添加功能:
添加一个职员的基本信息,包括姓名,工作证号,身份证号码,生日,家庭住址,家庭电话号码,部门,薪水,性别,职务、
2、删除功能:
能够对一个职员的信息进行删除按姓名进行删除、
3、删除全部职员信息:
能够对于全部职员的信息进行删除!
4、显示功能:
显示所有职员的主要信息包括姓名,身份证号码,工作证号,生日、!
5、查找功能:
根据你键入的职员姓名,显示其详细信息!
6、修改功能:
对职员的信息进行修改
如果回答满意,将追加到100分
boyontrain,剩余的可以发到QQ84635237或tmdss@163.com吗

楼主厚道了..
// Manager.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "resource.h"

#define MAX_LOADSTRING 100

// Global Variables:
HINSTANCE hInst;// current instance
TCHAR szTitle[MAX_LOADSTRING];// The title bar text
TCHAR szWindowClass[MAX_LOADSTRING];// The title bar text

Person person;//员工链表

// Foward declarations of functions included in this code module:
ATOMMyRegisterClass(HINSTANCE hInstance);
BOOLInitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);

//员工信息输入
LRESULT CALLBACK PersonInput(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
//保存文件
LRESULT CALLBACK FileSave(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
//打开文件
LRESULT CALLBACK FileOpen(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
//信息的修改
LRESULT CALLBACK PersonAmend(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
//删除记录
LRESULT CALLBACK DelNode(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{ // TOD Place code here.
MSG msg;
HACCEL hAccelTable;

// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_MANAGER, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);

// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}

hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_MANAGER);

// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

return msg.wParam;
}

//
//FUNCTION: MyRegisterClass()
//
//PURPOSE: Registers the window class.
//
//COMMENTS:
//
//This function and its usage is only necessary if you want this code
//to be compatible with Win32 systems prior to the 'RegisterClassEx'
//function that was added to Windows 95. It is important to call this function
//so that the application will get 'well formed' small icons associated
//with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{ WNDCLASSEX wcex;

wcex.cbSize = sizeof(WNDCLASSEX);

wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra= 0;
wcex.cbWndExtra= 0;
wcex.hInstance= hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MANAGER);
wcex.hCursor= LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDC_MANAGER;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm= LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);

return RegisterClassEx(&wcex);
}

//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
//In this function, we save the instance handle in a global variable and
//create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{ HWND hWnd;

hInst = hInstance; // Store instance handle in our global variable

hWnd = CreateWindow(szWindowClass, szTitle,WS_OVERLAPPEDWINDOW ,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

if (!hWnd)
{
return FALSE;
}

ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);

return TRUE;
}

//
//FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
//PURPOSE:Processes messages for the main window.
//
//WM_COMMAND - process the application menu
//WM_PAINT - Paint the main window
//WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ int wmId, wmEvent;

switch (message)
{
case WM_CREATE:
static HWND hWndEdit = CreateWindow(TEXT ("edit"), , NULL,
WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
WS_BORDER | ES_LEFT | ES_MULTILINE |
ES_AUTOHSCROLL | ES_AUTOVSCROLL,
0, 0, 0, 0, hWnd, (HMENU) 1,
((LPCREATESTRUCT) lParam) -> hInstance, NULL) ;

return 0 ;
case WM_SIZE:
MoveWindow (hWndEdit, 0, 0, LOWORD (lParam), HIWORD (lParam), false) ;
break;

case WM_COMMAND:
wmId= LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDR_FILE_SAVE://保存文件
DialogBox(hInst, (LPCTSTR) IDD_FILESAVE, hWnd, (DLGPROC) FileSave);
break;

case IDR_FILE_OPEN://打开文件
DialogBox(hInst, (LPCTSTR) IDD_FILEOPEN, hWnd, (DLGPROC) FileOpen);
break;

case IDR_EDIT_APPEND://添加信息
DialogBox(hInst, (LPCTSTR)IDD_PERSON_INPUT, hWnd, (DLGPROC)PersonInput);
break;

case IDR_EDIT_AMEND://修改信息
DialogBox(hInst, (LPCTSTR)IDD_PERSON_AMEND, hWnd, (DLGPROC)PersonAmend);
break;

case IDR_EDIT_DELNODE://删除信息
DialogBox(hInst, (LPCTSTR)IDD_DELNODE, hWnd, (DLGPROC) DelNode);
break;

case IDR_HELP_ABOUT://关于
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;

太长了...
好像发不上去阿..
楼主想想办法咯

地址:http://izone.qq.com/client/blog_one.htm?uin=115898046&diaryid=82298&voteid=0
http://cache.baidu.com/c?word=%C8%CB%CA%C2%3B%B9%DC%C0%ED%3B%CF%B5%CD%B3%2Cc%2B%2B&url=http%3A//bbs%2Elanlin%2Enet/dispbbs%2Easp%3Fboardid%3D81%26id%3D41273&b=0&a=127&user=baidu

这个也叫简单啊?