V.2.9
clsCommonWrapper

This class permits you to invoke functions and methods present in the modCtlCommon module when you're using Unicode Controls from a .ocx. Contains function used in Unicode Controls.
If you are using the "embedded" version (adding classes to your source code) you can use these methods without the class prefixing them by "Ctl_" so for example "
DefaultButtonStyle" become "Ctl_DefaultButtonStyle"
Methods:
ActivateLibrary Activates the library (for registered users)
ApplyFontToForm Applies a certain font to all form objects
AscW Returns the ordinal number of an UNICODE character, the VB6 function sometimes returns negative numbers ;-)
BlendColors Mixes two colors using a certain percentage (0 gives the first color, 100 gives the second color, 0 < Percentage < 100 gives a mix of the two colors)
CalculateStringDim Calculates the size of a string (Width, Height)-

The "bUseFlag_NoPrefix" parameter permits you to calculate the width of the string using the flag DT_NOPREFIX (see MSDN function DrawText) so you'll be able to calculate also the width of the '&' character
CalculateStringDimEx Calculates the size of a string (Width, Height) using the MSDN specified DrawText additional Flags
ChrW Returns an UNICODE character from a given character code
ClipByte Clips a value to a byte (0..255)
ColorInc Increments/Decrements a RGB color --> (R+INC,G+INC,B+INC)
ColorToComponents Returns the RGB components from a color
ConvertOLEColor Converts an OLE color to a standard RGB color
CreateColorBrush, ConvertOLEColor Used from other functions
DefaultButtonStyle Property that permits you to change the default button style (default=Vista Style); just set it one time when your program starts.
This property affects controls that have Style = -1& (Default).
DrawButton Draws a button using many options
DrawPixel Draws a pixel using a certain color
DrawRRect Draws a round rect using a certain pen
DrawRect, DrawLine Draws a rect/line on a specified DC using a specified color
DrawText, DrawTextColor Draws UNICODE text into a clipping rectangle
FadeToY, FadeToX Fades two colors
GetColorLuminance / SetColorLuminance Gets/Sets the luminance of a given color
GetUnicodeDroppedFiles Gets the list of the Unicode files from a DataObject object.
This function must be called in OLEDrag&Drop events.

ex:

Private Sub txtUniDrag_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)

Dim oc As Collection
Set oc=moCommonWrapper.GetUnicodeDroppedFiles(Data)

'
'Manage results...
'
End Sub
GetWindowsVersion, GetWindowsVersionEx Gets the Windows version
InIDE Checks if the program is running in VB6 environment
IsFontInstalled Checks if the specified font name is installed
IsUTF16String Same as IsUnicodeString
IsUTF8String Checks if a string is in UTF8 format
IsUnicodeString Checks if a string contains Unicode chars
IsUnicodeSystem The current system can handle Unicode?
IsAltDown, IsControlDown, IsEscDown, IsShiftDown Checks the status of some keys
LoByte, HiByte Splits a word into bytes
LoLong, HiLong Splits a 64 bit Long value into two Longs
LoWord, HiWord Splits a Double Word into Words
MakeDLong Makes a 64 bit Long value using two Longs
MakeDWord Makes a Double Word using two Words
MakeWord Makes a word using two bytes
OverlapImage Overlaps an image to a specified DC using transparency
ShiftState Gets the ALT/CTRL/SHIFT state (use the vbShiftMask / vbCtrlMask / vbAltMask) to check the value of the shift state

Ex:

Dim bShift as Boolean
Dim iShiftMask as Integer

iShiftMask=ShiftState()
bShift=(iShiftMask And vbShiftMask) <> 0
ShowMessageBoxW Shows an Unicode MessageBox
StrToUTF8, UTF8toStr Converts UNICODE to UTF8 and vice-versa
TextOut, TextOutColor Draws UNICODE text without a clipping rectangle
UniAppPath Returns the application path in UNICODE. PS. this function only works when you'll compile your application!!!
UniShellExecuteW Executes an Unicode Shell command (see ShellExecute API on MSDN for specific help on this command)
http://www.hexagora.com
Wed, 4 Mar 2009 13:44:49 UT
Copyright 2003-10 by Lorenzi Davide