【文件属性】:
文件名称:vc数据可视化编程
文件大小:1.34MB
文件格式:ZIP
更新时间:2016-12-27 01:25:19
vc数据可视化
该代码是基于vc的数据可视化功能
#include
#include
LRESULT CALLBACK WangProc(
HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
);
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd
)
{
WNDCLASS wndcls;
wndcls.cbClsExtra=0;
wndcls.cbWndExtra=0;
wndcls.hbrBackground=NULL;//(HBRUSH)GetStockObject(BLACK_BRUSH);
wndcls.hCursor=LoadCursor(NULL,IDC_NO);
wndcls.hIcon=LoadIcon(NULL,IDI_ERROR);
wndcls.hInstance=hInstance;
wndcls.lpfnWndProc=WangProc;
wndcls.lpszClassName="王朝帅";
wndcls.lpszMenuName=NULL;
wndcls.style=CS_VREDRAW | CS_PARENTDC/* | CS_HREDRAW*/;
RegisterClass(&wndcls);
HWND hwnd;
hwnd=CreateWindow("王朝帅","安徽大学 计算机科学与技术学院 王朝帅",WS_OVERLAPPEDWINDOW,
50,50,600,400,0,0,0,NULL);
ShowWindow(hwnd,SW_SHOWNORMAL);
UpdateWindow(hwnd);
MSG msg;
while(GetMessage(&msg,hwnd,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
LRESULT CALLBACK WangProc(
HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
)
{
switch(uMsg)
{
case WM_CHAR:
char szChar[20];
sprintf(szChar,"char is '%c'",wParam);
MessageBox(hwnd,szChar,"朝帅作品",MB_OK);
break;
case WM_LBUTTONDOWN:
MessageBox(hwnd,"mouse clicked","朝帅作品",MB_OK);
HDC hdc;
hdc=GetDC(hwnd);
TextOut(hdc,0,50,"MFC学习中心--朝帅作品",strlen("MFC学习中心--朝帅作品"));
ReleaseDC(hwnd,hdc);
break;
case WM_PAINT:
HDC hDC;
PAINTSTRUCT ps;
hDC=BeginPaint(hwnd,&ps);
TextOut(hDC,0,0,"MFC培训",strlen("MFC培训"));
EndPaint(hwnd,&ps);
break;
case WM_CLOSE:
if(IDYES==MessageBox(hwnd,"是否真的结束?","朝帅作品",MB_YESNO))
{
DestroyWindow(hwnd);
}
break;
case WM_DESTROY:
PostQuitMessage(1);
break;
default:
return DefWindowProc(hwnd,uMsg,wParam,lParam);
}
return 0;
}
【文件预览】:
可视化
----可视化.plg(246B)
----可视化.dsw(520B)
----source.cpp(2KB)
----可视化.ncb(33KB)
----可视化.dsp(4KB)
----可视化.opt(48KB)
----Debug()
--------可视化.pdb(345KB)
--------source.obj(15KB)
--------vc60.idb(121KB)
--------可视化.ilk(190KB)
--------vc60.pdb(76KB)
--------可视化.exe(168KB)
--------可视化.pch(3.39MB)