Tag Archives: C++

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.

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#

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