Changeset 119 for Include/basic/prompt.sbp
- Timestamp:
- Feb 23, 2007, 11:00:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/prompt.sbp
r110 r119 99 99 100 100 temporary[0]=_PromptSys_Buffer[i][i2] 101 #ifdef UNICODE 102 If _System_IsSurrogatePair(_PromptSys_Buffer[i][i2], _PromptSys_Buffer[i][i2+1]) Then 103 #else 101 104 If IsDBCSLeadByte(temporary[0]) Then 105 #endif 102 106 temporary[1]=_PromptSys_Buffer[i][i2+1] 103 107 temporary[2]=0 108 i2++ 104 109 Else 105 110 temporary[1]=0 … … 107 112 TextOut(hDC,i2*_PromptSys_FontSize.cx,i*_PromptSys_FontSize.cy,_ 108 113 temporary,lstrlen(temporary)) 109 110 If IsDBCSLeadByte(temporary[0]) Then i2++111 114 Next 112 115 End If … … 172 175 Dim CompForm As COMPOSITIONFORM 173 176 Dim hGlobal As HGLOBAL 174 Dim pTemp As BytePtr175 177 176 178 Select Case message … … 246 248 hGlobal=GetClipboardData(CF_TEXT) 247 249 If hGlobal=0 Then PromptProc=0:Exit Function 248 pTemp=GlobalLock(hGlobal) As *Byte 249 250 Dim pTemp=GlobalLock(hGlobal) As *Byte 251 #ifdef UNICODE 252 Dim tempSizeW = MultiByteToWideChar(CP_ACP, 0, pTemp, -1, 0, 0) + 1 253 TempStr=ZeroString(tempSizeW) 254 MultiByteToWideChar(CP_ACP, 0, pTemp, -1, StrPtr(TempStr), tempSizeW) 255 #else 250 256 TempStr=ZeroString(lstrlen(pTemp)+1) 251 257 lstrcpy(StrPtr(TempStr),pTemp) 252 258 #endif 253 259 lstrcpy((VarPtr(_PromptSys_InputStr[0])+_PromptSys_InputLen) As *Byte,pTemp) 254 260 _PromptSys_InputLen=_PromptSys_InputLen+lstrlen(pTemp) … … 337 343 _PromptSys_hWnd=CreateWindowEx(WS_EX_CLIENTEDGE,"PROMPT","BASIC PROMPT",WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,0,0,GetModuleHandle(0),0) 338 344 ShowWindow(_PromptSys_hWnd,SW_SHOW) 345 UpdateWindow(_PromptSys_hWnd) 339 346 340 347 Dim msg As MSG, iResult As Long … … 455 462 Case _System_Type_Integer,_System_Type_Word 456 463 SetWord(_System_InputDataPtr[i],Val(buf)) 457 Case _System_Type_ Char,_System_Type_Byte464 Case _System_Type_SByte,_System_Type_Byte 458 465 SetByte(_System_InputDataPtr[i],Val(buf)) 459 466 Case _System_Type_Char 467 #ifdef UNICODE 468 SetWord(_System_InputDataPtr[i], buf[0]) 469 #else 470 SetByte(_System_InputDataPtr[i], buf[0]) 471 #endif 460 472 Case _System_Type_String 473 *INPUT_FromPrompt_Type_String 461 474 Dim pTempStr As *String 462 475 pTempStr=_System_InputDataPtr[i] As *String … … 464 477 memcpy(pTempStr->Chars, buf.Chars, pTempStr->Length) 465 478 pTempStr->Chars[pTempStr->Length] = 0 479 Case 13 480 Goto *INPUT_FromPrompt_Type_String 466 481 End Select 467 482
Note:
See TracChangeset
for help on using the changeset viewer.