The V C++ GUI Framework:V Utilities

Several useful utility functions.

Synopsis

 * Header:
 * [vquickr.htm#VUTIL ]

Description
V provides several utility functions that can often help with software portability (and can just be useful). These are free subprograms - not a member of any specific class.

void ByteToStr(unsigned char b, char* str)
This will convert the unsigned char in b to a Hex character string in str. You need to make str big enough to hold the string.

void IntToStr(int intg, char* str)
This will convert the integer in intg to a character string in str. You need to make str big enough to hold the string.

void LongToStr(long intg, char* str)
This will convert the long integer in intg</tt> to a character string in str</tt>. You need to make str</tt> big enough to hold the string.

long StrToLong(char* str)
This will convert the character string in str</tt> into a long integer. You can cast to get ints.

void vBeep
This utility routine will sound an audible beep.

void vGetcmdIdIndex(ItemVal cmdId, CommandObject *cmdObj)
Sometimes when you work with a CommandObject array to define a dialog, you need to access the elements of a particular item in the array. This is especially true for manipulating lists. This routine will return the index into a CommandObject array of an entry with the supplied ItemVal cmdId</tt>.

void vGetLocalTime(char* tm)
This will return a string representation of the current local time to the string tm</tt>. The format will be ``HH:MM:SS AM''. If you need a different format, you will need to use the C functions time</tt>, localtime</tt>, and strftime</tt> directly.

void vGetLocalDate(char* dt)
This will return a string representation of the current local date to the string dt</tt>. The format will be ``MM/DD/YY''. If you need a different format, you will need to use the C functions time</tt>, localtime</tt>, and strftime</tt> directly.