Hi!
I'm programming in D at the moment, and i'm making use of the GetSystemMetrics function to determine the size of window borders. For some reason, a call to GetSystemMetrics(SM_CXDLGFRAME) produces different results when compiled with the dmd D-compiler and when called/compiled in vc.
The version in D returns 2
The version in c++ returns 3
There's nothing else than language/compiler that's been changed that i'm aware of.
What made me aware of this was cursor positioning in the D-port of irrlicht that is being worked on. On my computer, running Vista, this is what a 800x600-window looks like when created with Dirrlicht, and this is what a normal c++-irrlicht window(640x480 i think) looks like. The windows are created with the same style, so they ought to look the same, and the calls to GetSystemMetric ought to return the same values. I've confirmed that the binding of the win32-interface has correct style-values and systemmetric-parameter-value.
GetSystemMetrics behaves wierdly
Finally managed to track this down.
If any of you ever come across a scenario such as the one i've described, bear in mind that obscure default linker settings may be the cause; The linker i used seem to set a required subsystem version to 3.1 as default. Forcing it up to 4.0 made everything behave as expected. :)
If any of you ever come across a scenario such as the one i've described, bear in mind that obscure default linker settings may be the cause; The linker i used seem to set a required subsystem version to 3.1 as default. Forcing it up to 4.0 made everything behave as expected. :)