# White Knight GUI Library

I created this library for two reasons. The first is of course for money. But the second is because I wanted a simple well designed GUI package to meet varying needs. I look through over 20 of the most popular free and commercial GUI packages. I found that they either attempted, unsuccessfully, to mimic the famed Tk type packages found in other languages or they were similar to MFC®. The problem with the former is that you basically need certain features in the language that just are not present in C/C++ to make that type of architecture feasible, for instance anonomous classes. The problem with the MFC® derivatives is that they are very complicated, you could, in fact, teach an entire course on the subject.

So you ask why not just use the Win32 API? That is what I did. However, the Win32 API is, I think, counter intuitive. There are huge hedaches in managing the callbacks alone. So I thought the solution to the problem was to take the basic controls and put them in classes, that is what MFC® did. I did however want to maintain the power of Win32 API, I just wanted to make it less complicated, that is where MFC® went horribly wrong. You can in fact read the Win32 API documentation and use the native function calls and still make use of my classes. This created a strange hybrid creature, a veritable White Knight. This White Knight saves us from many headaches without losing functionality.

You can find usage and installation directions here

What follows are some tutorials on how to use my classes. They do not cover all the functionality packed into each one, but they do tell you the most common ways to use it. You should follow each one in the order presented. Also the code can be found in the samples directory. A note about the color scheme used in the code samples:

- C/C++ keywords
- Comment
- A #define created in MNGuiLib
- Global function defined in MNGuiLib
- MNGuiLib class
- A quoted string
- A #define created by the Win32 API
- A spection function, method, variable

Now on to the tutorials

1. My First Window — This tutorial will walk you through what you need to make a basic window.
2. Button & Callback Tutorial — This tutorial will walk you through how to use buttons and more importantly how to make callback functions.
3. Edit Tutorial — This tutorial will show you how to use edit controls.
4. Layout Manager Tutorial — This tutorial will show you how to use layout managers.
5. List Box & Combo Box Tutorial — In this tutorial you will learn how to use list boxes and combo boxes.
6. Common Dialog Tutorial — In this tutorial you will learn how to use error, message, open, and save dialogs.
7. Menu Bars, Menus, and Menu Items Tutorial — In this tutorial you will learn how to create and use menu bars, menus, and menu items.
8. Sockets and Server Sockets Tutorial — In this tutorial you will learn how to use sockets and server sockets.
9. Threads and Thread Groups — In this tutorial you will learn how to use threads and thread groups.