CProductKey class provides an easy way to enter IDs, PINs, product keys, or so forth. The data to be entered can consist of any number of fields of any length. You can choose a decimal, hexadecimal, or alphanumeric format for the key.
To achieve better readability, a special monospaced font approximately 1.5 times larger than the standard font will be used as the display font. The digit zero will be displayed with a point in the center instead of
0 to avoid cofusion with the letter
O. This special font will be embedded in the program as a binary resource. Manual installation or uninstallation of the font isn’t necessary. By studying the source code, you can learn the technique to embed customized fonts for temporary use into other programs, too.
Functions are provided to do simple Clipboard operations. After copying a product key to the Clipboard, the items of the product key will be separated by a special delimiter character. The default is the dash. If you choose the binary zero as the delimiter character, the items will not be separated.
CProductKey class members:
|Type of the product key: decimal, hexadecimal, or alphanumeric (0-9, A-Z).|
|Public member functions:|
|Copies the product key to the Clipboard. Returns |
|Copies the product key to the Clipboard. Then, the input fields for the product key will be deleted. Returns |
|Deletes the input fields for the product key.|
|Returns the product key. The items of the product key will be separated by the delimiter character (as |
|Returns the type of the product key (decimal, hexadecimal, or alphanumeric).|
|Limits the length of the input field for the item |
|Copies a product key from the Clipboard into the input fields. The delimiter character will be filtered. Returns |
|Copies the product key |
|Sets the delimiter character to the |
The delimiter character will be used to separate the items of the product key.
|Claims the input focus to the input field of the first item. The input focus directs all subsequent keyboard input to this window. Any window that previously had the input focus loses it. Returns a pointer to the window object that previously had the input focus. It is 0 if there is no such window. The returned pointer may be temporary and should not be stored.|
|Sets the type of the product key to |
|Subclasses the |