Include <windows.h> with openfl / cpp?

I’m working on a openfl project targeting cpp, and writing some extern cpp code.
Now, i need to include <windows.h> but it seems i get some strange errors.

error C2039: 'RegisterClassA': is not a member of 'hx'

Seems there is some kind of collision here…
This fixes it, but is it a ok solution?

#include <windows.h>
#undef RegisterClass

That’s the solution used generally when externing C++ projects of any description with Haxe. This happens because hxcpp is used by default when Haxe generates C++ code.

It won’t break anything by undefining RegisterClass unless you need to use the Windows-specific version of that function (highly unlikely) in Haxe. RegisterClass is a typedef to either RegisterClassA or RegisterClassW depending on whether you are using ASCII or UTF-8. I think the latter is the default.