Category Archives: Software development

Top 10 reasons to use Visual Studio for C++ Android Development!

Visual Studio: C++ cross-platform mobile solution

Visual Studio (download here) is fast becoming a cross-platform C++ IDE. Our vision is for Visual Studio to become the IDE of choice for your cross-platform C++ code whether you are targeting, Windows (UWP), Android, iOS, Linux, Xbox, PlayStation, Marmalade or more. In the past year or so, we have enabled support for Android, iOS (in preview) targeting, improved integration with the popular cross-platform game engine Marmalade, introduced a new compiler toolset (Clang/C2) for improving code portability between Windows and non-Windows platforms. If you talk about the Android platform specifically which is what this post is really about, typically the use of C++ is common for applications which are computationally intensive such as games and physics simulations but many applications today are using C++ for its cross-platform nature to author a part or entirety of their application.

Read more here: blogs.msdn.microsoft.com.

Visual Studio 2015 Community

For Individuals

Any individual developer can use Visual Studio Community to create their own free or paid apps.

For Organizations

An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects.

For all other usage scenarios:
In non-enterprise organizations, up to five users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or >$1 Million US Dollars in annual revenue), no use is permitted beyond the open source, academic research, and classroom learning environment scenarios described above.

For more information, see the Visual Studio Community license terms.

For Windows Desktop, Universal Windows Platform, iOS, and Android

Learn more about Universal Windows Platform development

Learn more about cross-platform mobile development

Bluetooth Device Development using C#

Fortunately it is very simple to interact with Bluetooth radio and devices on the phone using Windows Embedded Source Tools for Bluetooth Technology. This download contains a bunch of C# files which you can directly use in your code. You will get classes such as BluetoothDevice and BluetoothRadio which allow you to control the device and paired devices.

read more: blogs.msdn.com – bluetooth-device-control-development-using-c#

Visual Studio 2013 Community edition – Free, Unrestricted Version Of Visual Studio For Small Teams

Microsoft launched the Community 2013 edition of Visual Studio, which essentially replaces the very limited Visual Studio Express version the company has been offering for a few years now.

There is a huge difference between Visual Studio Express and the aptly named Visual Studio 2013 Community edition, though: The new version is extensible, so get access to the over 5,100 extensions now in the Visual Studio ecosystem. It’s basically a full version of Visual Studio with no restrictions, except that you can’t use it in an enterprise setting and for teams with more than five people (you can, however, use it for any other kind of commercial and non-commercial project).

“The simple way to think about this is that we are broadening up access to Visual Studio,” Microsoft’s corporate VP of its Developer Division S. “Soma” Somasegar told me in an interview late last month. Somasegar told me that the Community Edition will allow you to build any kind of application for the Web, mobile devices, desktop and the cloud. “It’s a full features version of Visual Studio,” he noted. “It includes the full richness of the Visual Studio extensions and ecosystem.”
more info, here:
Installing Visual Studio Versions Side-by-Side:
http://msdn.microsoft.com/en-us/library/ms246609.aspx

Visual Studio 2013 Compatibility:
How to make Visual Studio 2010 + 2012 + 2013 coexist together?
http://stackoverflow atorvastatin 20 mg.com/questions/22876932/how-to-make-visual-studio-2010-2012-2013-coexist-together

How to bring toolbars in a row using MFC (Microsoft Foundation Classes)

Normally you add Toolbars like this:

header file (‘MainFrm.h’):
………….
CMFCMenuBar m_wndMenuBar;
CMFCToolBar m_wndToolBar;
CMFCToolBar m_wndToolBar_Views3D;
CMFCToolBar m_wndToolBar_Export2D;
CMFCToolBar m_wndToolBar_Export3D;
………….

source file (‘MainFrm.cpp’):
………….
m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar_Views3D.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar_Export2D.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar_Export3D.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockPane(&m_wndMenuBar);
DockPane(&m_wndToolBar);
DockPane(&m_wndToolBar_Views3D);
DockPane(&m_wndToolBar_Export2D);
DockPane(&m_wndToolBar_Export3D);
………….

But this results in showing every toolbar on a new row …. 🙁

DockPaneLeftOf Not Used
DockPaneLeftOf Not Used

It’s very simple to change this to having all toolbars in one row,
just replace the code above (in ‘MainFrm.cpp’) with this one:

source file (‘MainFrm.cpp’):
…………. 
m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar_Views3D.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar_Export2D.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar_Export3D.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockPane(&m_wndMenuBar);
DockPane(&m_wndToolBar_Export3D);
DockPaneLeftOf(&m_wndToolBar_Export2D, &m_wndToolBar_Export3D);
DockPaneLeftOf(&m_wndToolBar_Views3D, &m_wndToolBar_Export2D);
DockPaneLeftOf(&m_wndToolBar, &m_wndToolBar_Views3D);
………….

Now you have it in one row …. 🙂

DockPaneLeftOf UsedDockPaneLeftOf Used

Using ‘_MSC_VER’ to check Microsoft Visual Studio version

If you develop applications for Windows using a Microsoft Visual C++ Compiler,  you may use the macro ‘_MSC_VER’ to check what compiler (version) you are using. Newer compilers have more possibilities of course or (more worse) things have just changed. So if you want (or must) support older ones you have to split your code.

The (current) values are:

MSVC++ 12.0 _MSC_VER = 1800 (Visual Studio 2013)
MSVC++ 11.0 _MSC_VER = 1700 (Visual Studio 2012)
MSVC++ 10.0 _MSC_VER = 1600 (Visual Studio 2010)
MSVC++ 9.0  _MSC_VER = 1500 (Visual Studio 2008)
MSVC++ 8.0  _MSC_VER = 1400 (Visual Studio 2005)
MSVC++ 7.1  _MSC_VER = 1310 (Visual Studio 2003)
MSVC++ 7.0  _MSC_VER = 1300 (Visual Studio 2002)
MSVC++ 6.0  _MSC_VER = 1200
MSVC++ 5.0  _MSC_VER = 1100

And here is a simple example how to use it:

#if (_MSC_VER >= 1600)  /*Visual Studio 2010*/
typedef /*unsigned*/ char mychar8; /**< defines the utf-8 character type. */
typedef wchar_t mychar16; /**< defines the utf-16 character type. */
#else /*(_MSC_VER >= 1600)*/
typedef /*unsigned*/ char mychar8; /**< defines the utf-8 character type. */
typedef unsigned short mychar16; /**< defines the utf-16 character type. */
#endif /*(_MSC_VER >= 1600)*/