I want to redefine a struct that is already declared by the win32 api. I just want to add a few operator overloads and stuff to it, but I am not sure how to do this.
I want to redefine a struct that is already declared by the win32 api. I just want to add a few operator overloads and stuff to it, but I am not sure how to do this.
Make a class, that has a different name, that has the win32 struct as a private data member. And then write whatever interface you really want.
Not sure what you have in mind though...usually I find myself wrapping the Win32 functions into a class, so that I don't have to look at their 15 parameters all the time...
The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.
alright that sounds like a good idea, what I have right now is I am just stoping it from declaring it's own struct and I am repliating it. It is working ok but I can see flaws in my way. Thanks.
you can declare your class within a namespace and derive it directly from the WINAPI struct:
Code:namespace my { struct WNDCLASSEX : public ::WNDCLASSEX { }; } int main(void) { my::WNDCLASSEX wce; }
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }