Click here to Skip to main content
15,903,385 members
Articles / Desktop Programming / MFC

GuiToolkit MFC Extension

Rate me:
Please Sign up or sign in to vote.
4.53/5 (167 votes)
16 Aug 20044 min read 2.2M   38.6K   384   625
A set of MFC GUI classes which allow you to build applications with the new Microsoft interface style
In this article, you will learn about GuiToolkit which is a complete set of classes based on MFC. It allows you to build applications with nice and sophisticated interfaces such as Visual Studio .NET, Office 2003, etc.

Image 1

Introduction

GuiToolkit is a complete set of classes based on MFC, that allows you to build applications with nice and sophisticated interfaces such as Visual Studio .NET, Office 2003, etc. The primary target is to have a complete free library that can be used without restrictions and suitable to user or programmers needs. This class set includes file management, connection through ADO, up to complex user's interface classes.

Guitoolkit was developed based on Paul Dilascia’s classes (father of almost all of this kind of libraries), including features like a Menu System and a floating bar (Thanks Paul for let me “ruin” all its wonderful code, hope you understand that I did it with sincerely my best intention); about the NewMenu Class (written by Bruno Podetti). I used “Hook” system. As a principal fact, I have tried to focus on code simplicity, in the way that you could isolate a class to understand it. Don’t expect to find in this library complex classes embedded into other, or sophisticated programming techniques.

I’ve tried to respect and preserve original class names of different authors, so every class that doesn’t begin with “Gui”, wasn’t written by me. As you could see, I’m the author of the 9x% of this classes.

GuiToolkit Users Guide

The code is free to use, except code that is not written by me, anyways you cannot take total or partial control of this code. This library is distributed in the hope that it will be useful, but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose.

Take your time to understand the given examples, and how to use the classes. In any case, I appreciate that someone wants to document this library. This library has a few or a lot of troubles, I hope that you can understand and forgive these human failures, like: There’s no documentation available, and there’s not tech support and some bugs in Windows 98.

You can use this library as you want and to demonstrate good or bad programming techniques, for your commercial application, to play, for improve it and share with us changes and to make me feel that my job gave you a plus making free code, in other words you don’t have to ask anybody for permissions this code is FREE in the way you respect author’s rights that let me use their code; and if you want to give me some credits (your welcome!), or you could show me, tell me and give the personal satisfaction of watching your own GuiToolkit built apps! “I appreciate it a lot”.

You can criticize the code being respectful, insults can freely direct to me but exclude Paul Dilascia, Bruno Podetti and other authors that I mention in credits section; they’re not guilty about my creation.

New Features

  • OneNote ® Style MDI tabs
  • Office ® XP/2003 look
  • Auto hide dockable bars
  • Docking tab colors
  • Visual Studio .NET look
  • And all components that you already know!

If you want the latest changes, visit the library web page http://www.beyondata.com/.

Some Examples

Image 2

Office menu bar XP styles provided:

Image 3

You can dispose of almost all controls in a dialog box using the CGuiStaticStandar class and obtain an interface such as next image.

Image 4

View more http://www.beyondata.com/.

What Comes Next?

Many things should be improved in the close future, errors, more controls, a text editor, to improve some classes, windows docking, autohidden functions, etc.

Credit

  • Thanks to Paul Dilascia VC++ MFC Guru, to allow using his class set for the menu management, thanks a lot I learned a huge things of his code.
  • Thanks to Bruno Podetti for your splendid menu class.
  • Thanks to David Yuheng Zhao for your VisualStylesXP class.
  • Thanks to Mohammad Ahmad Khaleel for your Cgradient class.

History

  • 31st July, 2002 - Updated source code
  • 20th August, 2002 - Updated source code
  • 10th January, 2003 - Updated source code
  • 18th August, 2004 - Updated source code

License

This article has no explicit license attached to it, but may contain usage terms in the article text or the download files themselves. If in doubt, please contact the author via the discussion board below.

A list of licenses authors might use can be found here.


Written By
Colombia Colombia
My name is Francisco Campos, A developer as you.I have the title of Engineer of Systems of the Universidad Autonoma de Colombia.My real Job Information Security officer, experience in security assessment, applications, and other related subjects.

Francisco.camposg@outlook.com

Comments and Discussions

 
GeneralRe: Da Pain :) Pin
Carlos Antollini1-Aug-02 16:06
Carlos Antollini1-Aug-02 16:06 
GeneralRe: Da Pain :) Pin
Anonymous1-Aug-02 16:35
Anonymous1-Aug-02 16:35 
GeneralRe: Da Pain :) Pin
Carlos Antollini1-Aug-02 17:52
Carlos Antollini1-Aug-02 17:52 
GeneralRe: Da Pain :) Pin
Anonymous8-Aug-02 17:55
Anonymous8-Aug-02 17:55 
GeneralRe: Da Pain :) Pin
msousa2-Aug-02 3:12
msousa2-Aug-02 3:12 
GeneralFlicker when switch the MDI child frame Pin
Anonymous31-Jul-02 22:05
Anonymous31-Jul-02 22:05 
GeneralRe: Flicker when switch the MDI child frame Pin
msousa1-Aug-02 4:35
msousa1-Aug-02 4:35 
GeneralGarbaged Menu Strings and how to Fix it... Pin
igor196031-Jul-02 13:53
igor196031-Jul-02 13:53 
OK, on WinNT after building the project I've got basic functionality working -- however, Menu Strings were showing completely long garbaged values...
Cause, I had this problem before it took me several minutes to correct this by modifying source code of GuiLib... Tha's what yopu have to do:
1. Put the following declaration at the end of StdAfx.h:
//
// There is a BUG in GeMenuItemInfo => doesn't want to work with WINVER = 5000, => 48 bytes
// we are redifining it here:

#ifndef __MENUITEMINFO_LOCAL_DEFINED
#define __MENUITEMINFO_LOCAL_DEFINED
typedef struct tagMENUITEMINFO_LOCAL
{
UINT cbSize;
UINT fMask;
UINT fType; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
UINT fState; // used if MIIM_STATE
UINT wID; // used if MIIM_ID
HMENU hSubMenu; // used if MIIM_SUBMENU
HBITMAP hbmpChecked; // used if MIIM_CHECKMARKS
HBITMAP hbmpUnchecked; // used if MIIM_CHECKMARKS
DWORD dwItemData; // used if MIIM_DATA
LPSTR dwTypeData; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
UINT cch; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
} MENUITEMINFO_LOCAL;
#endif

2. Put the same declaration in \Header\CoolMenu.h, before CMenuItem struct is declared...
3. Replace all occurences of MENUITEMINFO with MENUITEMINFO_LOCAL in files located GuiLib subir and header subdir
4. For All calls to GeMenuItemInfo in the code in GuiLib -- do an explicit cast for arg number 4 like that one:
GetMenuItemInfo(menu, 0, MF_BYPOSITION, (MENUITEMINFO *)&info);


Just my 2 cents
GeneralRe: Garbaged Menu Strings and how to Fix it... Pin
msousa1-Aug-02 4:32
msousa1-Aug-02 4:32 
QuestionHow to join and contribute to the project? Pin
Paul Selormey30-Jul-02 23:43
Paul Selormey30-Jul-02 23:43 
AnswerRe: How to join and contribute to the project? Pin
msousa31-Jul-02 4:36
msousa31-Jul-02 4:36 
QuestionSupport Windows2000 style? Pin
fhchina30-Jul-02 20:06
fhchina30-Jul-02 20:06 
AnswerRe: Support Windows2000 style? Pin
msousa31-Jul-02 4:48
msousa31-Jul-02 4:48 
GeneralRe: Support Windows2000 style? Pin
fhchina31-Jul-02 20:54
fhchina31-Jul-02 20:54 
GeneralRe: Support Windows2000 style? Pin
msousa1-Aug-02 4:31
msousa1-Aug-02 4:31 
AnswerRe: Support Windows2000 style? Pin
lorba8-Aug-02 17:51
lorba8-Aug-02 17:51 
GeneralText Editor Pin
Fayez Al-Naddaf30-Jul-02 8:55
Fayez Al-Naddaf30-Jul-02 8:55 
GeneralRe: Text Editor Pin
msousa30-Jul-02 10:11
msousa30-Jul-02 10:11 
GeneralNew Version 1.1.1 Pin
msousa28-Jul-02 19:10
msousa28-Jul-02 19:10 
QuestionLAYOUT_LTR ? Pin
bryce25-Jul-02 14:38
bryce25-Jul-02 14:38 
AnswerRe: LAYOUT_LTR ? Pin
bryce25-Jul-02 14:50
bryce25-Jul-02 14:50 
GeneralRe: LAYOUT_LTR ? Pin
msousa26-Jul-02 1:46
msousa26-Jul-02 1:46 
GeneralRe: LAYOUT_LTR ? Pin
ViolaCase30-Jul-02 20:55
ViolaCase30-Jul-02 20:55 
GeneralRe: LAYOUT_LTR ? Pin
msousa31-Jul-02 4:29
msousa31-Jul-02 4:29 
GeneralRe: LAYOUT_LTR ? Pin
Mark Findlay31-Jul-02 5:49
Mark Findlay31-Jul-02 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.