Placing Logo on the Top DockBar of the Frame Window

Great class that enables you to place your logo on the main dockbar of your SDI/MDI applications!

provided by: 
Originally published at Internet.com


We had to place our logo at some place in the right top corner of the frame window. I decided to place it on the top dockbar and created CLogo class for this purpose. This class is used for handling logo's location, tooltips and the message line in the status bar. Logo positions itself in the top right corner within parent dockbar. If the logo intersects with any toolbar then CLogo hides and otherwise it becomes visible. CLogo uses a string resource with the integer identifier of the logo window for displaying tooltips and the message line in the status bar. Besides, CLogo sends ON_LOGO_CLICK registered window message to the application main window when a user clicks on the logo window.



In the demo project I put in this article I derived CLogo from MFC CBitmapButton class. But you could change my code and derive CLogo from any class derived from CWnd. I use the class, from which CLogo is derived, for visual representation of logo.

Step 1: Create a new Single document or Multiple document project by using MFC AppWizard.

Step 2: Add Logo.cpp and Logo.h files to the project...

Read article at Internet.com site
Related Articles
- Code to View/Hide Status Bar in SDI and MDI Applications
Here's a little handler for the OnViewStatusBar message handler to change the "View/Hide Status Bar" menu option so that the application (main) window changes its height according to the size of the visible client area.
- Resizable Docking Window 2
- List control with single / double separator lines
- Animated Background Banner
Regional Articles
- Placing Logo on the Top DockBar of the Frame Window Alabama
- Placing Logo on the Top DockBar of the Frame Window Alaska
- Placing Logo on the Top DockBar of the Frame Window Arizona
- Placing Logo on the Top DockBar of the Frame Window Arkansas
- Placing Logo on the Top DockBar of the Frame Window California
- Placing Logo on the Top DockBar of the Frame Window Colorado
- Placing Logo on the Top DockBar of the Frame Window Connecticut
- Placing Logo on the Top DockBar of the Frame Window DC
- Placing Logo on the Top DockBar of the Frame Window Delaware
- Placing Logo on the Top DockBar of the Frame Window Florida
- Placing Logo on the Top DockBar of the Frame Window Georgia
- Placing Logo on the Top DockBar of the Frame Window Hawaii
- Placing Logo on the Top DockBar of the Frame Window Idaho
- Placing Logo on the Top DockBar of the Frame Window Illinois
- Placing Logo on the Top DockBar of the Frame Window Indiana
- Placing Logo on the Top DockBar of the Frame Window Iowa
- Placing Logo on the Top DockBar of the Frame Window Kansas
- Placing Logo on the Top DockBar of the Frame Window Kentucky
- Placing Logo on the Top DockBar of the Frame Window Louisiana
- Placing Logo on the Top DockBar of the Frame Window Maine
- Placing Logo on the Top DockBar of the Frame Window Maryland
- Placing Logo on the Top DockBar of the Frame Window Massachusetts
- Placing Logo on the Top DockBar of the Frame Window Michigan
- Placing Logo on the Top DockBar of the Frame Window Minnesota
- Placing Logo on the Top DockBar of the Frame Window Mississippi
- Placing Logo on the Top DockBar of the Frame Window Missouri
- Placing Logo on the Top DockBar of the Frame Window Montana
- Placing Logo on the Top DockBar of the Frame Window Nebraska
- Placing Logo on the Top DockBar of the Frame Window Nevada
- Placing Logo on the Top DockBar of the Frame Window New Hampshire
- Placing Logo on the Top DockBar of the Frame Window New Jersey
- Placing Logo on the Top DockBar of the Frame Window New Mexico
- Placing Logo on the Top DockBar of the Frame Window New York
- Placing Logo on the Top DockBar of the Frame Window North Carolina
- Placing Logo on the Top DockBar of the Frame Window North Dakota
- Placing Logo on the Top DockBar of the Frame Window Ohio
- Placing Logo on the Top DockBar of the Frame Window Oklahoma
- Placing Logo on the Top DockBar of the Frame Window Oregon
- Placing Logo on the Top DockBar of the Frame Window Pennsylvania
- Placing Logo on the Top DockBar of the Frame Window Rhode Island
- Placing Logo on the Top DockBar of the Frame Window South Carolina
- Placing Logo on the Top DockBar of the Frame Window South Dakota
- Placing Logo on the Top DockBar of the Frame Window Tennessee
- Placing Logo on the Top DockBar of the Frame Window Texas
- Placing Logo on the Top DockBar of the Frame Window Utah
- Placing Logo on the Top DockBar of the Frame Window Vermont
- Placing Logo on the Top DockBar of the Frame Window Virginia
- Placing Logo on the Top DockBar of the Frame Window Washington
- Placing Logo on the Top DockBar of the Frame Window West Virginia
- Placing Logo on the Top DockBar of the Frame Window Wisconsin
- Placing Logo on the Top DockBar of the Frame Window Wyoming

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML