#casting comptime known int to *opaque{}

1 messages · Page 1 of 1 (latest)

graceful remnant
#

im trying to achieve the last argument
FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1));

grave remnant
graceful remnant
#

I'm sorry that i didn't explicitly ask the question but what i was really wondering about is since built in functions return *anyopaque but externed windows functions require pointer to opaque{} would it still work

grave remnant
#

I'm still not sure what the question is. You said yourself, the argument is a comptime int. The formal argument type is whatever you declare FillRect to or whatever the library you're using is declaring it to (I don't think there is a standard). So what is exactly your situation?