Changeset 497 for trunk/Include/basic/prompt.sbp
- Timestamp:
- Mar 28, 2008, 5:43:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/basic/prompt.sbp
r411 r497 8 8 Namespace Prompt 9 9 Namespace Detail 10 10 11 11 Function _PromptSys_GetTextExtentPoint32(hdc As HDC, psz As PCSTR, cb As Long, ByRef Size As SIZE) As Long 12 12 _PromptSys_GetTextExtentPoint32 = GetTextExtentPoint32A(hdc, psz, cb, Size) … … 47 47 Type _PromptSys_LineInformation 48 48 Length As Long 49 Text As * StrChar49 Text As *Char 50 50 CharInfo As *_PromptSys_CharacterInformation 51 51 End Type … … 53 53 Dim _PromptSys_hFont As HFONT 54 54 Dim _PromptSys_FontSize As SIZE 55 Dim _PromptSys_InputStr[255] As StrChar55 Dim _PromptSys_InputStr[255] As Char 56 56 Dim _PromptSys_InputLen = -1 As Long 57 57 Dim _PromptSys_KeyChar As Byte … … 97 97 Next 98 98 _PromptSys_TextLine[100].Length = 0 99 _PromptSys_TextLine[100].Text = _System_calloc(SizeOf ( StrChar) * 255)99 _PromptSys_TextLine[100].Text = _System_calloc(SizeOf (Char) * 255) 100 100 _PromptSys_TextLine[100].CharInfo = _System_calloc(SizeOf (_PromptSys_CharacterInformation) * 255) 101 101 _PromptSys_CurPos.y-- … … 136 136 End If 137 137 With _PromptSys_FontSize 138 _PromptSys_TextOut(hDC, currentLineCharInfo[i2].StartPos, i * .cy, VarPtr(_PromptSys_TextLine[i].Text[i2]) As * StrChar, tempLen)138 _PromptSys_TextOut(hDC, currentLineCharInfo[i2].StartPos, i * .cy, VarPtr(_PromptSys_TextLine[i].Text[i2]) As *Char, tempLen) 139 139 End With 140 140 i2 += tempLen … … 191 191 EndIf 192 192 Dim p = buf.StrPtr 193 _PromptSys_GetTextExtentPoint32(hdc, VarPtr(p[i2]) As * StrChar, charLen, sz)193 _PromptSys_GetTextExtentPoint32(hdc, VarPtr(p[i2]) As *Char, charLen, sz) 194 194 currentLineCharInfo[.x + 1].StartPos = currentLineCharInfo[.x].StartPos + sz.cx 195 195 End If … … 421 421 End If 422 422 Dim tempStr = Nothing As String 423 Dim str As *StrChar 424 #ifdef __STRING_IS_NOT_UNICODE 425 Dim size = _PromptWnd_GetCompositionStringA(himc, str) 426 tempStr = New String(str, size As Long) 427 #else 423 Dim str As *Char 424 #ifdef UNICODE 428 425 Dim osver = System.Environment.OSVersion 429 426 With osver 430 ' GetCompositionStringW is not implimented in Windows 95 427 ' GetCompositionStringW is not implimented in Windows 95 431 428 If .Version.Major = 4 And .Version.Minor = 0 And .Platform = System.PlatformID.Win32Windows Then 432 429 Dim strA As PCSTR … … 438 435 End If 439 436 End With 437 #else 438 Dim size = _PromptWnd_GetCompositionStringA(himc, str) 439 tempStr = New String(str, size As Long) 440 440 #endif 441 441 ImmReleaseContext(hwnd, himc) … … 460 460 With _PromptSys_TextLine[i] 461 461 .Length = 0 462 .Text = _System_calloc(SizeOf ( StrChar) * 255)462 .Text = _System_calloc(SizeOf (Char) * 255) 463 463 .CharInfo = _System_calloc(SizeOf (_PromptSys_CharacterInformation) * 255) 464 464 End With … … 543 543 For i = 0 To 100 544 544 With _PromptSys_TextLine[i] 545 .Text[0] = 0 '_System_FillChar(_PromptSys_TextLine[i].Text, -1 As StrChar, 0)545 .Text[0] = 0 '_System_FillChar(_PromptSys_TextLine[i].Text, -1 As Char, 0) 546 546 .Length = 0 547 547 End With … … 589 589 590 590 'Set value to variable 591 Const comma = &h2c As StrChar 'Asc(",")591 Const comma = &h2c As Char 'Asc(",") 592 592 Dim broken = ActiveBasic.Strings.Detail.Split(New String(_PromptSys_InputStr), comma) 593 593 Dim i As Long … … 617 617 Dim i = _PromptSys_TextLine[y].Length 618 618 If i < x Then 619 ActiveBasic.Strings.ChrFill(VarPtr(_PromptSys_TextLine[y].Text[i]), x - i, &h20 As StrChar) 'Asc(" ")619 ActiveBasic.Strings.ChrFill(VarPtr(_PromptSys_TextLine[y].Text[i]), x - i, &h20 As Char) 'Asc(" ") 620 620 Dim i2 As Long 621 621 For i2 = i To ELM(x)
Note:
See TracChangeset
for help on using the changeset viewer.