Ok here is my problem: i just got Windows 95 Programming For Dummies and it said to compile the programs with Visual C++ but all i have is CodeWarrior. CodeWarrior has MFC support so i thought it would be alright if i compiled it with that. After i typed the hello, world program and i had three errors. Two were spelling mistakes and i still can't figure out why the third one is wrong because i copied it exactly. Here is the little piece of code:
-------------------------------------------------------
wndClass.style = 0;
wndClass.lpfnWndProc= WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 0;
wndClass.hInstance = hInstance;
wndClass.hIcon = LoadIcon(NULL,IDI_APPLICATION);
wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndClass.hbrBackground = GetStockObject( WHITE_BRUSH );*/
wndClass.lpszMenuName = NULL;
wndClass.lpszClassName = szAppName;
-------------------------------------------------------
there is more to the program but this is the part where i get the error. When i try to compile this CodeWarrior gives me this message:
------------------------------------------------------
Error : illegal implicit conversion from 'void *' to
'HBRUSH__ *'
main.cpp line 42 wndClass.hbrBackground = GetStockObject( WHITE_BRUSH );
-------------------------------------------------------
i hope you understand what i am trying to get fixed. If somebody could please help me i would appreciate it.
Thanks.
_RacerX
Comments
: -------------------------------------------------------
: wndClass.style = 0;
: wndClass.lpfnWndProc= WindowProc;
: wndClass.cbClsExtra = 0;
: wndClass.cbWndExtra = 0;
: wndClass.hInstance = hInstance;
: wndClass.hIcon = LoadIcon(NULL,IDI_APPLICATION);
: wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
: wndClass.hbrBackground = GetStockObject( WHITE_BRUSH );*/
: wndClass.lpszMenuName = NULL;
: wndClass.lpszClassName = szAppName;
: -------------------------------------------------------
: there is more to the program but this is the part where i get the error. When i try to compile this CodeWarrior gives me this message:
: ------------------------------------------------------
: Error : illegal implicit conversion from 'void *' to
: 'HBRUSH__ *'
: main.cpp line 42 wndClass.hbrBackground = GetStockObject( WHITE_BRUSH );
: -------------------------------------------------------
: i hope you understand what i am trying to get fixed. If somebody could please help me i would appreciate it.
: Thanks.
: _RacerX