wxGetOsVersion() is giving different result in different applications on the same machine
Posted: Thu May 10, 2018 10:06 am
Hi.
I created two UI applications using wxWidget3.0.4. Both the applications have Frame and menus. In one application i am getting assert message while clicking on menu(..\src\msw\toplevel.cpp assert"m_menuDepth>0"), other application working fine.
While searching for this issue i found that wxGetOsVersion() returning "wxWinVersion_Unknown", that is why assert is coming. In other application wxGetOsVersion() is returning wxWinVersion_7.
I tried ::GetVersionEx() method in both the applications. In working project it giving MajorVersion - 6 & MinorVersion - 1(Windows7), In non working project MajorVersion - 8 & MinorVersion - 3.
I am not sure why it is giving wrong value, Both projects using wxWidget3.0.4 & VS2015. I checked the project configuration, it looks same for bot the projects.
Pls help me to find why it is returning different value in the same machine. Actually i am migrating these projects from wxWidget2.4.2 to wxWidget3.0.4.
I am sure, both the projects link with wxWidget3.0.4\lib\vc_dll\, i added all the necessary libs.
- wxWidget3.0.4
- VS2015
- Windows7 64bit
- ProjectConfiuration Debug - 32bit
Thanks.
I created two UI applications using wxWidget3.0.4. Both the applications have Frame and menus. In one application i am getting assert message while clicking on menu(..\src\msw\toplevel.cpp assert"m_menuDepth>0"), other application working fine.
While searching for this issue i found that wxGetOsVersion() returning "wxWinVersion_Unknown", that is why assert is coming. In other application wxGetOsVersion() is returning wxWinVersion_7.
I tried ::GetVersionEx() method in both the applications. In working project it giving MajorVersion - 6 & MinorVersion - 1(Windows7), In non working project MajorVersion - 8 & MinorVersion - 3.
I am not sure why it is giving wrong value, Both projects using wxWidget3.0.4 & VS2015. I checked the project configuration, it looks same for bot the projects.
Pls help me to find why it is returning different value in the same machine. Actually i am migrating these projects from wxWidget2.4.2 to wxWidget3.0.4.
I am sure, both the projects link with wxWidget3.0.4\lib\vc_dll\, i added all the necessary libs.
- wxWidget3.0.4
- VS2015
- Windows7 64bit
- ProjectConfiuration Debug - 32bit
Thanks.