warning C4101: 'hCursor' : unreferenced local variable 10
caseWM_PAINT:hdc=BeginPaint(hwnd,&ps);if(bCircle==TRUE){Ellipse(hdc,rectl.left,rectl....
case WM_PAINT:
hdc=BeginPaint(hwnd,&ps);
if(bCircle==TRUE)
{
Ellipse(hdc,rectl.left,rectl.top,rectl.right,rectl.bottom);
}
if(bRect==TRUE)
{
Rectangle(hdc,rectl.left,rectl.top,rectl.right,rectl.bottom);
}
EndPaint(hwnd,&ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
return(DefWindowProc(hwnd,iMessage,wParam,lParam));
}
return 0;
}
BOOL InitWindows(HINSTANCE hInstance,int nCmdShow)
{
HWND hwnd;
hwnd=CreateWindow("6_5",
"鼠标显示实例程序",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
0,
CW_USEDEFAULT,
0,
NULL,
NULL,
hInstance,
NULL);
if(! hwnd)
return FALSE;
hWndMain=hwnd;
ShowWindow(hwnd,nCmdShow);
UpdateWindow(hwnd);
return TRUE;
}
BOOL InitWindowsClass(HINSTANCE hInstance)
{
WNDCLASS WndClass;
WndClass.cbClsExtra = 0 ;
WndClass.cbWndExtra = 0 ;
WndClass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
WndClass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
WndClass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
WndClass.hInstance = hInstance ;
WndClass.lpfnWndProc = WndProc ;
WndClass.lpszMenuName = NULL ;
WndClass.lpszClassName = "6_4" ;
WndClass.style = 0 ;
return RegisterClass(&WndClass);
} 展开
hdc=BeginPaint(hwnd,&ps);
if(bCircle==TRUE)
{
Ellipse(hdc,rectl.left,rectl.top,rectl.right,rectl.bottom);
}
if(bRect==TRUE)
{
Rectangle(hdc,rectl.left,rectl.top,rectl.right,rectl.bottom);
}
EndPaint(hwnd,&ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
return(DefWindowProc(hwnd,iMessage,wParam,lParam));
}
return 0;
}
BOOL InitWindows(HINSTANCE hInstance,int nCmdShow)
{
HWND hwnd;
hwnd=CreateWindow("6_5",
"鼠标显示实例程序",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
0,
CW_USEDEFAULT,
0,
NULL,
NULL,
hInstance,
NULL);
if(! hwnd)
return FALSE;
hWndMain=hwnd;
ShowWindow(hwnd,nCmdShow);
UpdateWindow(hwnd);
return TRUE;
}
BOOL InitWindowsClass(HINSTANCE hInstance)
{
WNDCLASS WndClass;
WndClass.cbClsExtra = 0 ;
WndClass.cbWndExtra = 0 ;
WndClass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
WndClass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
WndClass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
WndClass.hInstance = hInstance ;
WndClass.lpfnWndProc = WndProc ;
WndClass.lpszMenuName = NULL ;
WndClass.lpszClassName = "6_4" ;
WndClass.style = 0 ;
return RegisterClass(&WndClass);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询