RadASM set up for GoAsm. This file contains my setup for using GoAsm with the RadASM IDE, it includes the inline debug macros and static library as well as the all of the necessary support files
RadGoAsm.zip (258KB) updated April 14, 2009
Note: The older version of windows.inc is no longer supported, I have decided to remove it but have kept a backup copy if someone asks for it.
All of the following examples contain royalty-free source code written by me. You may use the source code in your application in any way you like and are not required to ask my permission or even inform me. However, I would like to ask that you do not use the code in a paid tutorial, it should remain free. There is also no requirement to mention me in any way whatsoever. That said, a small mention in an about box buried on page 3 would be nice, and I do appreciate it when people email me to tell me that they have found one of my snippets useful. In the source you may find dwordtoascii, a GoAsm translation of a snippet by Tim Roberts and GetCL which comes from the MASM32 library, author unknown. Both are copyright their respective authors and are part of the free MASM32 library and subject to it's conditions. They were included for convenience and clarity and are easily replaceable with API functions if necessary.
Please note that all of this code is Copyright © Edgar Hansen 2003-2009, and may be freely used and distributed as part of any package including commercial software, as long as the source of the code is not misrepresented. There is no need to ask permission or to acknowledge me. For those who wish to release any code contained here in an application licensed under the GPL I would ask that you not do so.
AES encryption algorithm (Rijndael)
The Rijndael encryption algorithm was selected as the AES standard algorithm for data encryption. This GoAsm implementation is a translation of the code by Joan Daemen. It includes switch selectable key size and either dynamic or static tables.
JetStream is a small utility that allows you to examine JET databases. It uses ODBC to display information about each table and field in a database. I use this utility quite a lot when working on my database software.
This is an implementation of the IContextMenu shell extension. It is a COM server application that adds a menu item to the right click context menu of EXE and DLL files of Windows Explorer.
This is a small application that demonstrates many registry functions. It is a simple registry browser that allows you to view the registry in a hierarchical tree structure much like regedit.exe
This sample is a GoAsm version of a snippet of code from "Using CODECs to Compress Wave Audio", an article that appeared in the April 1997 issue of MSDN magazine. It will enumerate the codecs on a system and display information about each codec in a list box.
This example shows how to extract information from a 32/64 bit PE file and display it in a dialog.
PE Directories lists the import and export directories from a 32 bit PE file (EXE or DLL) and displays them in a dialog. This example also acts as a useful tool in determining dependencies for your application.
This is an example of extracting some basic information about a fixed disk drive. It uses DeviceIoControl to get the drive geometry and standard API functions to extract other relevant information.
Track scroll bar
This example shows how to use a tracking scroll bar for things like volume control etc..
This is a custom drawn menu demo, it creates and draws a font menu generated from an enumeration of the ANSI_CHARSET fonts found on your system
Bitmap Button with modifiable text
This example shows how to draw text on a bitmap button. This is useful if you want images on your buttons but would like dynamically loaded multilingual labels for each button. Since it is primarily targeted for multilingual use it is a Unicode application.
This demo shows how to change some aspects of a listview control, such as the hilight colour and text colour. It also creates a copy and paste menu that allows you to copy the text in any item to and from the clipboard. As an added bonus it sets up the sort direction buttons in the header control and will sort the listview based on a number of possible parameters.
AniToolbar displays animated icons on a normal toolbar. It uses a bit of a trick to do it by showing the icons in a static control and placing it over the toolbar button.
DataIcon demonstrates how to use INCBIN to include an icon in your data or const section and extract a handle that can be used in any API that accepts an icon.
This is an example of how to use a toolbar for menus, giving you the flexibility of a toolbar with menus
This example shows a vertical toolbar menu.
This example shows how to extract version information from an application. It can be used to build version strings for about boxes.
This example shows ownerdrawn buttons. The example uses an imagelist with the up and down images and draws the buttons with a back buffer directly from the imagelist. No messy handles to deal with or bitmaps to delete.
This example demonstrates a simple ownerdrawn combobox
Custom dialog caption
In this example I have given a dialog a custom caption. The caption is painted with a pattern brush to give it a unique embossed look and uses a Comic Serif font, it handles all of the necessary functions such as the system menu and double clicking the icon to exit. I have not tried it on XP with it's snazzy large captions but it should look OK but not perfect on it.
In this example I overlay one icon on top of another returning a new combined icon. The second icon is displayed in the lower right corner at half size (16x16). This can be useful for creating hint icons or to change the look of an icon temporarily without having to put alot of them in your resources.
Hyperlink custom control
This custom control allows you to place hyperlinks for emails and websites on a dialog or in a window. This control has been updated to allow for more rigid compliance with URL naming conventions in the email subject and body, the text is now canonicalized in order to allow spaces to be properly interpretted in Mozilla Thunderbird.
This snippet demonstrates how to allow your program to exit gracefully if an exception occurs. It will display a dialog detailing the exception and allow the user to email the exception information directly. The exception details are copied to the clipboard for easy posting to a forum or error report. You may insert this code directly into your application (with the RC dialog), you have only to change the email address in the ErrorDlgProc. It also provides a chance to unhook windows hooks, clean up handles and memory etc.. before exiting.
This sample demonstrates how to implement a drag listbox
Owner drawn status bar
This sample demonstrates how to add colors and icons to a status bar
This example shows how to calculate the number of clocks per second your CPU is running at. The information is useful for converting the return value of RDTSC into seconds or simply for a timing function that has a higher resolution than GetTickCount. It can also be used to calculate the processor frequency by deviding the result by 1 million to get Mhz. It demonstrates setting thread priorities.
Extracting information from the desktop
In this example I show how to extract information from the desktop listview. The program will extract the display name, the position, the file type and the fully qualified path to an item on your desktop. It also demonstrates a quick way to check for NT compatible version of Windows using the FS segment override and how to use that information to dynamically import functions that are available only to the OS the program is running on..