Original Post
Hi. I''ve been reading TWGPG by LaMothe and I been using it to start out a game I''ve been planning to do in DirectX. Well, I''ve all the code out of the book to get the main idea of how to do it and form it too my game. But at build time (I use VC 6.0) I get this error:
c:\testament\testament\main.cpp(86) : error C2440: ''='' : cannot convert from ''void *'' to ''struct HBRUSH__ *''
Here is the code it comes from
Any ideas would be appreciated. Thanks
winclass.cbSize = sizeof(WNDCLASSEX);
winclass.style = CS_DBLCLKS | CS_OWNDC |
CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc = WindowProc;
winclass.cbClsExtra = 0;
winclass.cbWndExtra = 0;
winclass.hInstance = hInstance;
winclass.hIcon = LoadIcon(NULL,IDI_APPLICATION);
winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
winclass.hbrBackground = GetStockObject(BLACK_BRUSH); // ERROR(86)
winclass.lpszMenuName = NULL;
winclass.lpszClassName = WINDOW_CLASS_NAME;
winclass.hIconSm = LoadIcon(NULL, DI_APPLICATION);
|