Changeset 123 for Include/basic/command.sbp
- Timestamp:
- Mar 1, 2007, 12:31:13 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/command.sbp
r121 r123 80 80 Macro INSMENU(hMenu As HMENU, PosID As Long, flag As Long)(lpString As String, id As Long, hSubMenu As HMENU, state As Long) 81 81 Dim mii As MENUITEMINFO 82 83 FillMemory(VarPtr(mii),Len(mii),0) 84 mii.cbSize=Len(mii) 85 mii.fMask=MIIM_TYPE 86 87 If lpString.Length=0 Then 88 mii.fType=MFT_SEPARATOR 89 Else 90 mii.fType=MFT_STRING 91 mii.fMask=mii.fMask or MIIM_STATE or MIIM_ID 92 mii.dwTypeData=StrPtr(lpString) 93 mii.wID=id 94 If hSubMenu Then 95 mii.fMask=mii.fMask or MIIM_SUBMENU 96 mii.hSubMenu=hSubMenu 82 ZeroMemory(VarPtr(mii), Len(mii)) 83 With mii 84 .cbSize = Len(mii) 85 .fMask = MIIM_TYPE 86 87 If lpString.Length = 0 Then 88 mii.fType = MFT_SEPARATOR 89 Else 90 .fType = MFT_STRING 91 .fMask = .fMask or MIIM_STATE or MIIM_ID 92 .dwTypeData = StrPtr(lpString) 93 .wID = id 94 If hSubMenu Then 95 .fMask = .fMask or MIIM_SUBMENU 96 .hSubMenu = hSubMenu 97 End If 98 .fState=state 97 99 End If 98 mii.fState=state 99 End If 100 101 InsertMenuItem(hMenu,PosID,flag,mii) 100 End With 101 InsertMenuItem(hMenu, PosID, flag, mii) 102 102 End Macro 103 103 … … 220 220 End Sub 221 221 222 Function_System_Input_SetArgument(arg As VoidPtr, dataType As DWord, ByRef buf As String, bufLen As Long)222 Sub _System_Input_SetArgument(arg As VoidPtr, dataType As DWord, ByRef buf As String, bufLen As Long) 223 223 Select Case dataType 224 224 Case _System_Type_Double … … 243 243 pTempStr->Chars[pTempStr->Length] = 0 244 244 End Select 245 End Function245 End Sub 246 246 247 247 Sub PRINT_ToFile(FileNumber As Long, buf As String) 248 248 Dim dwAccessByte As DWord 249 FileNumber =FileNumber-1249 FileNumber-- 250 250 251 251 WriteFile(_System_hFile(FileNumber),buf,Len(buf),VarPtr(dwAccessByte),ByVal NULL) … … 320 320 If length_buf>=length_num Then 321 321 '通常時 322 FillMemory(StrPtr(buffer)+i3,length_buf-length_num,Asc(" ")) 322 _System_FillChar(VarPtr(buffer[i3]), length_buf - length_num, &h20) 'Asc(" ") 323 323 324 i3 += length_buf - length_num 324 325 325 326 If sign Then 326 buffer[i3] =Asc("-")327 buffer[i3] = Asc("-") 327 328 i3++ 328 329 … … 330 331 End If 331 332 332 If dec >0 Then333 memcpy( StrPtr(buffer)+i3,temp2,length_num)333 If dec > 0 Then 334 memcpy(VarPtr(buffer[i3]), temp2, SizeOf (Char) * length_num) 334 335 Else 335 buffer[i3] =&H30336 buffer[i3] = &H30 336 337 End If 337 338 … … 339 340 Else 340 341 '表示桁が足りないとき 341 FillMemory(StrPtr(buffer)+i3,length_buf,Asc("#"))342 _System_FillChar(VarPtr(buffer[i3]), length_buf,&h23) 'Asc("#") 342 343 i3 += length_buf 343 344 End If 344 345 345 If UsingStr[i2] =Asc(".") Then346 buffer[i3] =UsingStr[i2]346 If UsingStr[i2] = Asc(".") Then 347 buffer[i3] = UsingStr[i2] 347 348 i2++ 348 349 i3++ 349 350 350 351 i4=dec 351 While UsingStr[i2] =Asc("#")352 While UsingStr[i2] = Asc("#") 352 353 If i4<0 Then 353 354 buffer[i3]=&H30 … … 364 365 i2++ 365 366 366 lstrcat(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum]) 367 i3=i3+lstrlen(_System_UsingStrData[ParmNum]) 367 'lstrcat(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum]) 368 memcpy(VarPtr(buffer[i3 + lstrlen(VarPtr(buffer[i3]))]), _System_UsingStrData[ParmNum], _ 369 SizeOf (Char) * lstrlen(_System_UsingStrData[ParmNum])) 370 i3 += lstrlen(_System_UsingStrData[ParmNum]) 368 371 ElseIf UsingStr[i2]=Asc("&") Then 369 372 i4=0 … … 380 383 i5=i4 381 384 Else 382 FillMemory(StrPtr(buffer)+i3,i4,Asc(" "))385 _System_FillChar(VarPtr(buffer[i3]), i4, &h20) 'Asc(" ") 383 386 End If 384 memcpy( StrPtr(buffer)+i3,_System_UsingStrData[ParmNum],i5)387 memcpy(VarPtr(buffer[i3]), _System_UsingStrData[ParmNum], SizeOf (Char) * i5) 385 388 i3 += i4 386 389 Else 387 390 i2 -= i4 388 buffer[i3] =Asc("&")391 buffer[i3] = Asc("&") 389 392 i2++ 390 393 i3++ … … 396 399 Wend 397 400 398 _System_GetUsingFormat =Left$(buffer,lstrlen(buffer))401 _System_GetUsingFormat = Left$(buffer, lstrlen(buffer)) 399 402 End Function 400 403 Sub PRINTUSING_ToFile(FileNumber As Long, UsingStr As String)
Note:
See TracChangeset
for help on using the changeset viewer.