winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
WNDCLASS object
I keep getting a error.
source code below
-------------------------------------
// first fill in the window class stucture
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);
winclass.lpszMenuName = NULL;
winclass.lpszClassName = WINDOW_CLASS_NAME;
---------------------------------------
This error occurs on the hrbBackGround line
"error C2440: '=' : cannot convert from 'void *' to 'struct HBRUSH__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast"
I looked in the MSDN docs and could not find anything that would explain the error. It looks right to me, but it obviously isn't. Someone please help.