Would anyone generously guide or point out us the critical key points to successfully compile and build a C++ source code intended to be built and released perfectly on Visual studio, in Mingw/msys?
Avoid specific vendor extensions like libraries of visual studio like stdafx and others. I use code blocks because it is more lightweight but you can use visual studio. Jus try that it is pure c++ or you have all libraries listed.
E.g. here's Windows 'zone' must be transfigure to Mingw/Msys:
Notepad++ plugin
A quick glance at that indicates that it makes heavy use of Microsoft's libraries. Unless you want to drastically rewrite parts of it, I guess you're going to need to get your Mingw/Msys environment set up to use those libraries.
I've never used Mingw or Msys before, but I'm sure this must be something that other people have done before. In fact, I would expect the documentation for that platform to cover it. If not, search online to see how others have solved this.