Author Topic: Of The Bay (version 3.00)  (Read 22525 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 2012
    • zapsolution
Of The Bay (version 3.00)
« on: May 09, 2017, 06:10:03 pm »
Of The Bay

This is version 3.00 of an old GDImage project written in 2008 in PowerBASIC.

It has been inspired by the MAC OS X dock bar, converted to the Windows world.



The layered transparent window is sitting at the bottom of the desktop.

The dock bar is populated only with transparent sprites, no API child controls, except for the popup contextual menu.


New in this version:

- The CPU footprint is now very low.
- Support for .URL short cut.
- Code clean up, and optimization.


How to use the dock bar:

Just move the mouse hover an icon, and press the left button to fire the short cut.
Hover a specific icon, press the right mouse button to see the full path to the target.
To close the dock bar and restore the initial desktop, popup the contextual menu and select the last line of the menu, or press the Escape key
when OTB has the focus.


Layered window

OfTheBay is a true layered window, using the UpdateLayeredWindow API to render directly onto the Windows desktop.

Using a layered window can significantly improve performance and visual effects for a window that has a complex shape, animates its shape, or wishes to use alpha blending effects. The system automatically composes and repaints layered windows and the windows of underlying applications. As a result, layered windows are rendered smoothly, without the flickering typical of complex window regions. In addition, layered windows can be partially translucent, that is, alpha-blended.
Hit testing of a layered window is based on the shape and transparency of the window. This means that the areas of the window that are color-keyed or whose alpha value is zero will let the mouse messages through, this is exactly how GDImage is working since its first version 1.00 written in 2002...


About the attachments:

1 - OfTheBayPB.zip
     This is the original 32-bit PowerBASIC / GDImage version, written in 2008 by Patrice Terrier.
2 - OTB_Patrice.zip
     Is a VS 2010-2017 C++ 64-bit standalone version (embedding a limited subset of the GDImage API), written by Patrice Terrier.
3 - OTB_Andrey.rar
     Is a VS 2015 32 and 64-bit standalone version, written by Andrey Unis.
« Last Edit: April 12, 2020, 02:24:09 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 2012
    • zapsolution
Of The Bay (version 4.00)
« Reply #1 on: July 25, 2025, 01:57:36 pm »
Andrey,

I have converted OfTheBay to work with VS2022, and TCLib.lib.

And now the binary size is only 47 Kb!
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 2012
    • zapsolution
Re: Of The Bay (version 3.00)
« Reply #2 on: July 29, 2025, 07:51:22 pm »
OfTheBay (OTB) – A modern FreeBASIC desktop dock bar



"OfTheBay" (OTB) is a lightweight, high-performance dock bar launcher developed in FreeBASIC 64-bit Unicode
It creates a visually appealing Mac-style dock along the bottom of the screen using layered windows and smooth GDI+ rendering.

Key features:
  • Fully skinned dock bar with per-pixel alpha blending (PNG + GDI+)
  • Supports both desktop shortcuts and taskbar-pinned entries
  • Pinned shortcuts are marked with a small overlay icon ("Pin.png") at top-left
  • Shortcuts automatically loaded from:
   - Desktop (Admin + Public)
   - Taskbar pinned folder (%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar)
  • Dynamic sizing and layout based on number of entries
  • Right-click anywhere on the dock to show the contextual popup menu
  • Can optionally hide desktop shortcut icons for a cleaner workspace
  • Automatic icon extraction from ".lnk", ".url", ".exe" targets
  • Fallback to custom icons when extraction fails (e.g. "Unknown.png")
  • Fast runtime execution with no dependencies beyond GDI+ and shell APIs
  • Final EXE size: ~140 KB (without UPX), under 60 KB with TCLib for the C/C++ version

Technical highlights:
  • Written entirely in procedural FreeBASIC (no classes, no external DLLs)
  • Shell integration via IShellLinkW and SHGetPathFromIDList
  • Support for ".lnk", ".url", and ".exe" entries using direct file scanning
  • Optional pin overlay uses "Pin.png" drawn over "UseFrame.png" on pinned entries
  • All rendering uses GDI+ with premultiplied alpha and layered window styles
  • Memory-efficient: dynamically manages all icon resources and bitmap handles
  • Clean startup/shutdown sequence, fully integrated with Windows environment

Usage tips:
  • Hover over icons to see labels and activate zoom animation
  • Click to launch
  • Right-click to open the context menu with OTB commands
  • To clean up your desktop, just enable "Hide Desktop Shortcuts" from the menu

Built and tested on: Windows 10 and Windows 11 (64-bit)

Made with ❤️ using FreeBASIC and native Windows API.

Demo and source code will be shared soon.
« Last Edit: July 29, 2025, 08:10:12 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)