Objective Toolkit : Chapter 12 Framework‑Tailored Shortcut Bars
Chapter 12 Framework‑Tailored Shortcut Bars
Overview
The new Shortcut Bar component is a framework (MFC, ATL) independent container that can be used for hosting regular HWND based Windows objects as well as 'visual components' that simply render themselves onto any given device context. This framework independence is achieved using the new Stingray Foundation Library (SFL). SFL, in conjunction with our existing Model View Controller (MVC) architecture, provides all the necessary plumbing that paves the way for the shortcut bar to be abstracted from the message/command mechanisms of MFC/ATL and to have a common core that can be plugged into either framework.
NOTE >> The term 'visual component', in the MVC context, refers to an instance of any class that derives from the MvcVisualComponent base. An MVC viewport is also a visual component. Please refer to the MVC documentation for detailed information on visual components, viewports and the MvcVisualComponent class.
Figure 101 – The Shortcut Bar
The SFL and MVC combination, together with the framework independence, makes it possible to provide two distinct variations of the shortcut bar - a regular windowed control and a non-windowed control. The windowed version has its own window handle while the non-windowed control uses the window handle of the host container.
For ease of use, four specialized implementations of the shortcut bar have been made available:
SECATLShortcutBarHosted
SECATLShortcutBarWnd
SECMFCShortcutBarHosted
SECMFCShortcutBarWnd