高手帮忙!为什么不能连接!
//myFristPrograme.cpp#include<windows.h>
#include<stdio.h>
LRESULT CALLBACK myProc(HWND curhwnd,
UINT nMsg,
WPARAM wParam,
LPARAM lParam
)
{
switch(nMsg)
{
case WM_CHAR:
char cArr[20];
sprintf(cArr,"char is%d",wParam);
MessageBox(curhwnd,cArr,"messageBox",0);
break;
default:
return DefWindowProc(curhwnd,nMsg,wParam,lParam);
}
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,//通常为0
LPSTR lpCmdLine,
int nCmdshow
)
{//1设计窗口
WNDCLASS wc;
wc.hInstance=hInstance;//操作系统一开始便分配了一个实例号
wc.lpfnWndProc=myProc;
wc.hbrBackground=(HBRUSH)GetStockObject(BLACK_BRUSH);
wc.lpszClassName="haha!";
wc.hCursor=LoadIcon(0,IDI_ERROR);
wc.style=CS_HREDRAW|CS_VREDRAW;
//2注册窗口
RegisterClass(&wc);
//3制造窗口
HWND hWnd;
hWnd=CreateWindow("wName","no",WS_OVERLAPPEDWINDOW,10,10,200,200,0,0,hInstance,0);
//4展示窗口
ShowWindow(hWnd,SW_SHOWNORMAL);
//5刷新/更新窗口
UpdateWindow(hWnd);
MSG msg;
while(GetMessage(&msg,0,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
每次运行都是下面的错误!恳请大家帮助!
fatal error LNK1168: cannot open Debug/FristPrograme071003.exe for writing