Reputation: 11
a.hbrBackground=GetStockObject(WHITE_BRUSH);
error: cannot convert from 'void *' to 'struct HBRUSH__ ' Conversion from 'void' to pointer to non-'void' requires an explicit cast
Cannot execute the above code in vc++
Please check the code.
Upvotes: 1
Views: 137
Reputation: 34418
That's normal for GetStockObject. You just need to cast it
a.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
Upvotes: 1