TerMakeMbcs
Build an MBCS string from lead and tail bytes.
int TerMakeMbcs(string, tail, lead,length)
HWND hWnd; | Handle of the window to be accessed |
LPBYTE string; | The location to retrieve the mbcs string. |
LPBYTE tail; | The pointer to the tail bytes of the mbcs string. |
LPBYTE lead; | The pointer to the lead bytes of the mbcs string. This string should have the same number of bytes as the 'tail' string. For the single-byte characters, the 'lead' byte should be set to NULL. |
int length; | Length of the 'tail' and 'lead' strings. |
Description: This function can be used to combine the lead and tail bytes of an mbcs (Multi-byte Character Set) string to return the combined mbcs string.
Return Value: This function returns the byte length of the mbcs string.
Example:
dim MbcsText as string*2000 ' location to retrieve the mbcs string
dim tail as string*MAX_WIDTH
dim lead as string*MAX_WIDTH
dim StringLen as integer
dim LineLen as Integer
tail=space$(MAX_WIDTH)
lead=space$(MAX_WIDTH)
LineLen=TerGetLineEx(hWnd,LineNo,tail,lead,NULL) ' get the lead and tail bytes for a text line
MbcsText=space$(MAX_WIDTH) ' allocate space for the parameter
StringLen = TerMakeMbcs(MbcsText,tail,lead,length(tail)) ' build an mbcs string