Показать сообщение отдельно

  #4  
Старый 29.10.2009, 20:23
-m0rgan-
Постоянный
Регистрация: 29.09.2008
Сообщений: 553
Провел на форуме:
2584134

Репутация: 519


По умолчанию

Код:
#include <windows.h>
#include <stdio.h>
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR CmdLine, int CmdShow)
{
	char szAppName[] = "HelloWin!";
	HWND hwnd;
	MSG msg;
	WNDCLASSEX wndclass;
	wndclass.cbSize = sizeof(wndclass);
	wndclass.style = CS_HREDRAW | CS_VREDRAW;
	wndclass.lpfnWndProc = WndProc;
	wndclass.cbClsExtra = 0;
	wndclass.cbWndExtra = 0;
	wndclass.hInstance = hInstance;
	wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
	wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
	wndclass.hbrBackground = (BRUSH) GetStockObject(WHITE_BRUSH);
	wndclass.lszMenuName = NULL;
	wndclass.lpzClassName = szAppName;
	RegisterClassEx(&wndclass);

	return 0;
}
Компелятор ругаецо:


Цитата:
c:\documents and settings\***\мои документы\visual studio 2008\projects\system\system\api.cpp(19) : error C2065: 'BRUSH' : undeclared identifier
c:\documents and settings\***\мои документы\visual studio 2008\projects\system\system\api.cpp(19) : error C2146: syntax error : missing ';' before identifier 'GetStockObject'
c:\documents and settings\***\мои документы\visual studio 2008\projects\system\system\api.cpp(20) : error C2039: 'lszMenuName' : is not a member of 'tagWNDCLASSEXW'
c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(1537) : see declaration of 'tagWNDCLASSEXW'
c:\documents and settings\***\мои документы\visual studio 2008\projects\system\system\api.cpp(21) : error C2039: 'lpzClassName' : is not a member of 'tagWNDCLASSEXW'
c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(1537) : see declaration of 'tagWNDCLASSEXW'
Я переписал все один в один с книги.
В чем проблема?
Компелю в VS 2008
 
Ответить с цитированием