IMG Developer's Kit: Developer's Kit Guide and Technical Documentation; Version 1.90; User's Guide | ||
---|---|---|
Prev | Chapter 8. Developer Tools and Examples | Next |
FOLDER: MTSAppBar
TYPE: Utility / Stand-alone Executable with Source
SOURCE: INCLUDED
LANGUAGE: C++ / Windows API
IDE: Microsoft Visual C++ 6
MTSAppBar interface is primarily for OnScreen - not tested with other builds.
The MTSAppBar source code was modified from the AppBar example available from Microsoft showing and integrated with OnScreen to trap OnScreen on the AppBar. The AppBar shell interface within Windows provides something similar to the Auto-Arrange windows in OnScreen - a way to limit Applications screen area and separate the OnScreen display from the Application being typed into. If actually used, turning off Auto-Arrange in OnScreen Setup | User Options | Operation Options, and clearing items like Allow Action Button move, etc. may make using OnScreen with the AppBar more effective.
The MTSAppBar executable creates a top or bottom based "AppBar" or a special window that changes the desktop window size.
This has a timer running (internal ID: IDT_MONITOR) that watches the OnScreen keyboard window, and reacts if the window is sized or moved - this resets the appbar to go to the top or bottom & size to the current keyboard size.
The code was modified from Microsoft sample code that created a more customizable appbar, similar to the Windows taskbar - so certain modifications were done to limit what could be done with this implementation of the AppBar.
Most of the code remains untouched, but there were minor modifications throughout. Here are notes on the changes:
Comments were modified throughout
UTIL.C - removed (slidewindow)
PROPSHT.C - removed (property sheet dialog)
GLOBALS.H - IDT_MONITOR ADDED
APPBAR.H - comments only
MYTSOFT.H - added, but slightly modified from normal Developer's Kit MYTSOFT.H (DEVKIT folder)
MAIN.C - code was added to the bottom for various utility aspects required, mainly coordinating with the My-T-Soft code - there were also add-ons in WinMain to prepare operation.
The window was created with out a thick frame (and the sizing/moving code modified - only menu commands can move window, and only to top & bottom)
APPBAR.C - Minor modifications (force desktop window redraw whenever _SetSide called
WNDPROC.C - Various modification throughout to accommodate changes to implementation (mostly OnTimer, OnCommand, OnCreate, OnPaint code removed)
APPBAR.RC - the about dialog modified, and menu modified, along with icon & bitmap
Comments:
The WinMain prep (MAIN.C) and OnTimer code (WNDPROC.C) is the most significant, along with the call to GetMTSAppBarHeight (MAIN.C) to establish correct window height.
The PrepareMyTSoft works with DevKit tools & messages to establish the correct INI file, and verify the MTSAppBar entry is in the DoNotArrangeClasses (Very IMPORTANT for correct operation).
Usage Notes:
Expects OnScreen to be running before it is launched (otherwise messagebox shown). Option to add a "WAIT" command line option to run in a "Sleep" (pause) loop to wait for OnScreen to open & paint (in case both are started at the same time (i.e. Windows StartUp Group). Run in a shortcut with "...\MTSAppBar.exe" WAIT
The code was built & tested in Microsoft Visual Studio 6 with Windows 2000.
AppBar example Copyright Microsoft Corporation.
Developers Kit Version 1.78 Release 3 - 9/22/2007
Copyright © 2007 by Innovation Management Group, Inc.
All Rights Reserved.
As seen in ...