The source code presented here is in a format that you can use immediately. Either the source file for the function or class is displayed or a ZIP file with the source code is available. Either way you will not have to edit the source code to remove the usual < and > HTML tags.
Some of the source code may require you to have additional debug facilities such as extra ASSERTs (which can just be edited out if you don't want them), you can download these from DebugHlp
The code in the links below is free to use with the following minor restrictions:
- Please leave the header comment intact.
- Do not distribute any code found here as part of a library.
- Do not use code found here on your own web site.
- Do not claim code found here as you own, give credit where it is due.
Other than that you can use the source code in your applications as you see fit.
The obvious disclaimer: The authors of the code cannot guarantee that the code works nor can they be held responsible for any loss or damage as a result of it's use.
Suggestions, Improvements or BugsEmail any suggestions, improvements or bug reports to me.
I'm lazy, I admit it, and I think all developers are essentially lazy. I like my code to be as easy to read as possible, I like whitespace and I enjoy the use of comments. Mostly I prefer my code to look the same. Here is a link to my guidelines. Rememeber that's all they are, not rules but preferences.
StringString related functions and classes.
- Trim the trailing white space from a string
- Trim the leading white space from a string
- Replace all occurrences of a character in a string
- Case insensitive version of strstr, find a string within a string
- Get the right n characters of a string
- Removes all occurrences of a string from another
- Case insensitive version of strremove
WindowFunctions and classes related to using windows.
- Easy way to set both large and well formed small icons for a window.
- Determine if a point is within a window.
- Simple class that wraps up the GetWindowTextLength/GetWindowText functions
- Determine the correct visibility of a window.
File/DirectoryFunctions and classes related to using files and directories
- Remove the filename element from a fully qualified file path.
- Given a HINSTANCE it will retrieve the path without the filename.
- Function to retrieve from the system the path to the program files directory
- Creates an entire directory path, including sub-directories
- Write a C style string to a file
- Wrapper for the _splitpath and _makepath functions
- Utility function to get the three times associated with a file.
- Utility function to set the three times associated with a file.
- class CRandomFile
- Store, retrieve, delete and recycle random sized data in a file.
MiscellaneousFunctions and classes that currently have no real home.
- Function to normalize the coordinates of a rectangle
- Class to make it a little easier to load any type of resource.
- Copy a HBITMAP to the clipboard
- Exception safe wrapper class for Load/FreeLibrary APIs
- Get the disk free space regardless of Win95 release
- Draw a HBITMAP onto a DC
- Stretch Draw a HBITMAP onto a DC
- Tile a HBITMAP onto a DC
- Wrapper class for dynamically loading the RAS DLL
- Get the current color depth
InternetClasses and function that are somehow related to the internet
- Class HTTPParametersABC
- Abstract base class that parses the parameters passed into a CGI or ISAPI EXE/DLL.