Changeset 125


Ignore:
Timestamp:
Mar 2, 2007, 2:57:09 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

#51完了

Location:
Include
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/IO/Path.ab

    r62 r125  
    11Class Path
    22Public
    3     Static AltDirectorySeparatorChar = &H2F As Byte '/
    4     Static DirectorySeparatorChar = &H5C As Byte    '\
    5     Static PathSeparator = &H3B As Byte             ';
    6     Static VolumeSeparatorChar = &H3A As Byte       ':
     3    Static AltDirectorySeparatorChar = &H2F As Char '/
     4    Static DirectorySeparatorChar = &H5C As Char    '\
     5    Static PathSeparator = &H3B As Char             ';
     6    Static VolumeSeparatorChar = &H3A As Char       ':
    77
    88    Static Function GetFileName(path As String) As String
     
    5050    End Function
    5151
    52     Static Function HasExtension(ByRef path As String) As BOOL
     52    Static Function HasExtension(ByRef path As String) As Boolean
    5353        If GetExtension(path) <> "" Then
    5454            Return _System_TRUE
     
    5959
    6060    Static Function GetTempFileName() As String
    61         ' TODO: 実装
     61        Dim tempPathSize = __GetTempPath(0, 0)
     62        Dim tempPath = _System_malloc(SizeOf (TCHAR) * tempPathSize) As PTSTR
     63        If tempPath = 0 Then
     64            ' Throw OutOfMemoryException
     65            Debug
     66        End If
     67        If __GetTempPath(tempPathSize, tempPath) > tempPathSize Then
     68            ' Throw IOException?
     69            Debug
     70        End If
     71
     72        Dim tempFileName[ELM(MAX_PATH)] As TCHAR
     73        __GetTempFileName(tempPath, "ABT", 0, tempFileName)
     74        free(tempPath)
     75        Return tempFileName
    6276    End Function
    6377
     
    148162    Return GetTempPath(nBufferLength, lpBuffer)
    149163End Function
     164
     165Function __GetTempFileName(pPathName As PCSTR, pPrefixString As PCSTR, uUnique As DWord, pTempFileName As PSTR) As DWord
     166    Return GetTempFileName(pPathName, pPrefixString, uUnique, pTempFileName)
     167End Function
  • Include/Classes/System/String.ab

    r123 r125  
    1212        String()
    1313        Assign(initStr)
     14    End Sub
     15
     16    Sub String(initStr As *Char, length As Long)
     17        String()
     18        Assign(initStr, length)
    1419    End Sub
    1520
     
    454459
    455460    Sub ToLower()
    456         CharLower(Chars)
     461        Dim i As Long
     462        For i = 0 To m_Length
     463            Chars[i] = _System_ASCII_ToLower(Chars[i])
     464        Next
    457465    End Sub
    458466
    459467    Sub ToUpper()
    460         CharUpper(Chars)
     468        Dim i As Long
     469        For i = 0 To m_Length
     470            Chars[i] = _System_ASCII_ToUpper(Chars[i])
     471        Next
    461472    End Sub
    462473
  • Include/api_gdi.sbp

    r123 r125  
    660660TypeDef LOGFONT = LOGFONTA
    661661#endif
    662 Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (ByRef lplf As LOGFONT) As HFONT
     662Declare Function CreateFontIndirectA Lib "gdi32" (ByRef lf As LOGFONTA) As HFONT
     663Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (ByRef lf As LOGFONT) As HFONT
    663664
    664665Declare Function CreateHatchBrush Lib "gdi32" (fnStyle As Long, clrref As COLORREF) As HBRUSH
  • Include/api_imm.sbp

    r119 r125  
    2121Declare Function ImmDisableIME Lib "imm32" (idThread As DWord) As BOOL
    2222#ifdef UNICODE
    23 Declare Function ImmGetCompositionString Lib "imm32" Alias "ImmGetCompositionStringA" (hIMC As HIMC, dwIndex As DWord, pBuf As VoidPtr, dwBufLen As DWord) As Long
     23Declare Function ImmGetCompositionString Lib "imm32" Alias "ImmGetCompositionStringW" (hIMC As HIMC, dwIndex As DWord, pBuf As VoidPtr, dwBufLen As DWord) As Long
    2424#else
    2525Declare Function ImmGetCompositionString Lib "imm32" Alias "ImmGetCompositionStringA" (hIMC As HIMC, dwIndex As DWord, pBuf As VoidPtr, dwBufLen As DWord) As Long
     
    3838
    3939#ifdef UNICODE
    40 Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontW" (hIMC As HIMC, ByRef lplf As LOGFONT) As Long
     40Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontW" (hIMC As HIMC, ByRef lf As LOGFONT) As Long
    4141#else
    42 Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontA" (hIMC As HIMC, ByRef lplf As LOGFONT) As Long
     42Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontA" (hIMC As HIMC, ByRef lf As LOGFONT) As Long
    4343#endif
    44 Declare Function ImmSetCompositionFontA Lib "imm32" (hIMC As HIMC, ByRef lplf As LOGFONTA) As Long
    45 Declare Function ImmSetCompositionFontW Lib "imm32" (hIMC As HIMC, ByRef lplf As LOGFONTW) As Long
     44Declare Function ImmSetCompositionFontA Lib "imm32" (hIMC As HIMC, ByRef lf As LOGFONTA) As Long
     45Declare Function ImmSetCompositionFontW Lib "imm32" (hIMC As HIMC, ByRef lf As LOGFONTW) As Long
    4646Declare Function ImmSetCompositionWindow Lib "imm32" (hIMC As HIMC, ByRef CompForm As COMPOSITIONFORM) As BOOL
    4747
  • Include/api_system.sbp

    r121 r125  
    335335Declare Function InterlockedExchangePointer Lib "kernel32" Alias "InterlockedExchange" (ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr
    336336#endif
     337
     338
    337339Declare Function Beep Lib "kernel32" (dwFreq As DWord, dwDuration As DWord) As BOOL
    338340Declare Function CloseHandle Lib "kernel32" (hObject As HANDLE) As BOOL
     
    597599    ByRef FileInformation As BY_HANDLE_FILE_INFORMATION
    598600) As BOOL
    599 Declare Function GetFileSize Lib "kernel32" (hFile As HANDLE, lpFileSizeHigh As DWordPtr) As DWord
     601Declare Function GetFileSize Lib "kernel32" (hFile As HANDLE, pFileSizeHigh As *DWord) As DWord
    600602Declare Function GetFileTime Lib "kernel32" (hFile As HANDLE, ByRef lpCreationTime As FILETIME, ByRef lpLastAccessTime As FILETIME, ByRef lpLastWriteTime As FILETIME) As BOOL
    601603
     
    621623) As BOOL
    622624Declare Function GetPriorityClass Lib "kernel32" (hProcess As HANDLE) As DWord
    623 Declare Function GetProcAddress Lib "kernel32" (hModule As HINSTANCE, lpProcName As BytePtr) As DWord
     625Declare Function GetProcAddress Lib "kernel32" (hModule As HINSTANCE, pProcName As PCSTR) As DWord
    624626Declare Function GetProcessAffinityMask Lib "kernel32" (
    625627    hProcess As HANDLE,
     
    634636) As DWord
    635637
    636 Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (ByRef lpStartupInfo As STARTUPINFO)
     638Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (ByRef StartupInfo As STARTUPINFO)
    637639
    638640Const STD_INPUT_HANDLE  = -10
     
    655657    wProcessorRevision As Word
    656658End Type
    657 Declare Sub GetSystemInfo Lib "kernel32" (ByRef lpSystemInfo As SYSTEM_INFO)
     659Declare Sub GetSystemInfo Lib "kernel32" (ByRef SystemInfo As SYSTEM_INFO)
    658660
    659661Declare Sub GetSystemTime Lib "kernel32" (ByRef SystemTime As SYSTEMTIME)
     
    666668    pTempFileName As PSTR
    667669) As DWord
    668 Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (nBufferLength As DWord, lpBuffer As BytePtr) As DWord
     670Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (nBufferLength As DWord, lpBuffer As PSTR) As DWord
    669671Declare Function GetThreadContext Lib "kernel32" (hThread As HANDLE, ByRef Context As CONTEXT) As BOOL
    670672
     
    691693Const TIME_NOTIMEMARKER        = &H00000004
    692694Const TIME_FORCE24HOURFORMAT   = &H00000008
    693 Declare Function GetTimeFormat Lib "kernel32" Alias "GetTimeFormatA" (Locale As LCID, dwFlags As DWord, ByRef lpTime As SYSTEMTIME, lpFormat As BytePtr, lpTimeStr As BytePtr, cchTime As DWord) As BOOL
     695Declare Function GetTimeFormat Lib "kernel32" Alias "GetTimeFormatA" (Locale As LCID, dwFlags As DWord, ByRef Time As SYSTEMTIME, lpFormat As BytePtr, lpTimeStr As BytePtr, cchTime As DWord) As BOOL
    694696
    695697Declare Function GetUserDefaultLCID Lib "kernel32" () As LCID
     
    707709    szCSDVersion[127] As Byte
    708710End Type
    709 Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByRef lpVersionInformation As OSVERSIONINFO) As BOOL
     711Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByRef VersionInformation As OSVERSIONINFO) As BOOL
    710712
    711713Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (pBuffer As PSTR, uSize As DWord) As DWord
     
    737739Declare Function HeapReAlloc Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, lpMem As VoidPtr, dwBytes As SIZE_T) As VoidPtr
    738740Declare Function HeapSize Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, lpMem As VoidPtr) As SIZE_T
    739 Declare Sub InitializeCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
     741Declare Sub InitializeCriticalSection Lib "kernel32" (ByRef CriticalSection As CRITICAL_SECTION)
    740742Declare Function IsBadReadPtr Lib "kernel32" (lp As VoidPtr, ucb As ULONG_PTR) As BOOL
    741743Declare Function IsBadWritePtr Lib "kernel32" (lp As VoidPtr, ucb As ULONG_PTR) As BOOL
     
    826828Declare Function OpenProcess Lib "kernel32" (dwDesiredAccess As DWord, bInheritHandle As Long, dwProcessId As DWord) As HANDLE
    827829
    828 Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (lpOutputString As BytePtr)
     830Declare Sub OutputDebugStringA Lib "kernel32" (pOutputString As PCSTR)
     831Declare Sub OutputDebugStringW Lib "kernel32" (pOutputString As PCWSTR)
     832#ifdef UNICODE
     833Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringW" (pOutputString As PCTSTR)
     834#else
     835Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (pOutputString As PCTSTR)
     836#endif
    829837Declare Function PulseEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
    830838Declare Sub RaiseException Lib "kernel32" (
     
    841849Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (lpComputerName As BytePtr) As BOOL
    842850Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (lpPathName As BytePtr) As BOOL
     851Declare Function SearchPath Lib "kernel32" Alias "SearchPathA" (pPath As PCSTR, pFileName As PCSTR, pExtension As PCSTR, BufferLength As DWord, pBuffer As PSTR, ByRef pFilePart As PSTR) As DWord
    843852Declare Function SetEndOfFile Lib "kernel32" (hFile As HANDLE) As BOOL
    844853Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (lpName As BytePtr, lpValue As BytePtr) As BOOL
  • Include/basic/function.sbp

    r123 r125  
    694694    Dim temp[255] As Char
    695695#ifdef _WIN64
    696     _sntprintf(temp, Len (temp) / SizeOf (Char), "%I64d", value)
     696    _sntprintf(temp, Len (temp) \ SizeOf (Char), "%I64d", value)
    697697#else
    698     _sntprintf(temp, Len (temp) / SizeOf (Char), "%d", value)
     698    _sntprintf(temp, Len (temp) \ SizeOf (Char), "%d", value)
    699699#endif
    700700    Str$ = temp
     
    10681068End Function
    10691069
    1070 Function _System_FillChar(p As *Char, n As SIZE_T, c As Char)
     1070Sub _System_FillChar(p As *Char, n As SIZE_T, c As Char)
    10711071    Dim i As SIZE_T
    10721072    For i = 0 To ELM(n)
    10731073        p[i] = c
    10741074    Next
     1075End Sub
     1076
     1077Function _System_ASCII_IsUpper(c As Char) As Boolean
     1078    Return c As DWord - &h41 < 26 ' &h41 = Asc("A")
     1079End Function
     1080
     1081Function _System_ASCII_IsLower(c As Char) As Boolean
     1082    Return c As DWord - &h61 < 26 ' &h61 = Asc("a")
     1083End Function
     1084
     1085Function _System_ASCII_ToLower(c As Char)
     1086    If _System_ASCII_IsUpper(c) Then
     1087        Return c Or &h20
     1088    Else
     1089        Return c
     1090    End If
     1091End Function
     1092
     1093Function _System_ASCII_ToUpper(c As Char)
     1094    If _System_ASCII_IsLower(c) Then
     1095        Return c And (Not &h20)
     1096    Else
     1097        Return c
     1098    End If
     1099End Function
     1100
     1101Function _System_WideCharToMultiByte(s As PCWSTR) As PSTR
     1102    Return _System_WideCharToMultiByte(s, lstrlenW(s) + 1, 0)
     1103End Function
     1104
     1105Function _System_WideCharToMultiByte(s As PCWSTR, size As Long) As PSTR
     1106    Return _System_WideCharToMultiByte(s, size, 0)
     1107End Function
     1108
     1109Function _System_WideCharToMultiByte(ws As PCWSTR, size As Long, flag As DWord) As PSTR
     1110    Dim sizeMBS = WideCharToMultiByte(CP_THREAD_ACP, flag, s, size, 0, 0, 0, 0)
     1111    Dim mbs = malloc(sizeMBS) As PSTR
     1112    WideCharToMultiByte(CP_THREAD_ACP, flag, s, size, mbs, sizeMBS, 0, 0)
     1113    Return mbs
     1114End Function
     1115
     1116Function _System_MultiByteToWideChar(s As PCSTR) As PWSTR
     1117    Return _System_MultiByteToWideChar(s, lstrlenA(s) + 1, 0)
     1118End Function
     1119
     1120Function _System_MultiByteToWideChar(s As PCSTR, size As Long) As PWSTR
     1121    Return _System_MultiByteToWideChar(s, size, 0)
     1122End Function
     1123
     1124Function _System_MultiByteToWideChar(s As PCSTR, size As Long, flag As DWord) As PWSTR
     1125    Dim sizeMBS = MultiByteToWideChar(CP_THREAD_ACP, flag, s, size, 0, 0)
     1126    Dim mbs = malloc(SizeOf (WCHAR) * sizeMBS) As PWSTR
     1127    MultiByteToWideChar(CP_THREAD_ACP, flag, s, size, mbs, sizeMBS)
     1128    Return mbs
    10751129End Function
    10761130
  • Include/basic/prompt.sbp

    r123 r125  
    1313
    1414'text
     15
    1516Dim _PromptSys_LogFont As LOGFONTA 'LOGFONT
    1617Dim _PromptSys_hFont As HFONT
     
    2324Dim _PromptSys_TextColor[100] As *COLORREF
    2425Dim _PromptSys_BackColor[100] As *COLORREF
     26Dim _PromptSys_TextWidth[100] As Long
    2527Dim _PromptSys_NowTextColor As COLORREF
    2628Dim _PromptSys_NowBackColor As COLORREF
     
    4547Sub DrawPromptBuffer(hDC As HDC, StartLine As Long, EndLine As Long)
    4648    Dim i As Long, i2 As Long, i3 As Long
    47     Dim sz As SIZE
    48     Dim temporary[2] As Char
    4949
    5050    Dim hOldFont = SelectObject(hDC, _PromptSys_hFont) As HFONT
     
    5353    Dim rc As RECT
    5454    GetClientRect(_PromptSys_hWnd, rc)
    55     While (_PromptSys_CurPos.y+1)*_PromptSys_FontSize.cy>rc.bottom and _PromptSys_CurPos.y>0
     55    While (_PromptSys_CurPos.y+1) * _PromptSys_FontSize.cy > rc.bottom and _PromptSys_CurPos.y > 0
    5656        _System_free(_PromptSys_Buffer[0])
    5757        _System_free(_PromptSys_TextColor[0])
    5858        _System_free(_PromptSys_BackColor[0])
    59         For i=0 To 100-1
     59        For i = 0 To 100 - 1
    6060            _PromptSys_Buffer[i] = _PromptSys_Buffer[i+1]
    6161            _PromptSys_TextColor[i] = _PromptSys_TextColor[i+1]
    6262            _PromptSys_BackColor[i] = _PromptSys_BackColor[i+1]
     63            _PromptSys_TextWidth[i] = _PromptSys_TextWidth[i+1]
    6364        Next
    6465        _PromptSys_Buffer[100] = _System_calloc(SizeOf (Char) * 255)
    6566        _PromptSys_TextColor[100] = _System_calloc(SizeOf(COLORREF) * 255)
    6667        _PromptSys_BackColor[100] = _System_calloc(SizeOf(COLORREF) * 255)
     68        _PromptSys_TextWidth[100] = 0
    6769
    6870        _PromptSys_CurPos.y--
    6971
    7072        'Redraw
    71         StartLine=-1
     73        StartLine = -1
    7274    Wend
    7375
    74     i=0
    75     While i*_PromptSys_FontSize.cy<rc.bottom and i<=100
     76    i = 0
     77    While i * _PromptSys_FontSize.cy < rc.bottom and i <= 100
    7678        If StartLine=-1 or (StartLine<=i and i<=EndLine) Then
     79            Dim sz As SIZE
    7780            i3 = lstrlen(_PromptSys_Buffer[i])
    7881            GetTextExtentPoint32(hDC, _PromptSys_Buffer[i], i3, sz)
    7982
    8083            BitBlt(hDC,_
    81                 sz.cx, i*_PromptSys_FontSize.cy, _
     84                sz.cx, i * _PromptSys_FontSize.cy, _
    8285                rc.right, _PromptSys_FontSize.cy, _
    83                 _PromptSys_hMemDC,sz.cx,i*_PromptSys_FontSize.cy,SRCCOPY)
    84 
     86                _PromptSys_hMemDC, sz.cx, i * _PromptSys_FontSize.cy, SRCCOPY)
     87
     88            Dim width = 0 As Long
    8589            For i2 = 0 To i3-1
    8690                SetTextColor(hDC, _PromptSys_TextColor[i][i2])
     
    9296                End If
    9397
     98                Dim temporary[2] As Char
    9499                Dim tempLen As Long
    95                 temporary[0]=_PromptSys_Buffer[i][i2]
     100                temporary[0] = _PromptSys_Buffer[i][i2]
    96101#ifdef UNICODE
    97102                If _System_IsSurrogatePair(_PromptSys_Buffer[i][i2], _PromptSys_Buffer[i][i2+1]) Then
     
    108113                End If
    109114                With _PromptSys_FontSize
    110                     TextOut(hDC, i2 * .cx, i * .cy, temporary, tempLen)
     115                    TextOut(hDC, width, i * .cy, temporary, tempLen)
    111116                End With
     117                GetTextExtentPoint32(hDC, temporary, i3, sz)
     118                width += sz.cx
    112119            Next
    113120        End If
     
    150157            .x++
    151158        Loop
     159
    152160        'Draw the text buffer added
    153161        Dim hDC = GetDC(_PromptSys_hWnd)
     
    182190
    183191            Dim tm As TEXTMETRIC
    184             Dim hOldFont=SelectObject(_PromptSys_hMemDC, _PromptSys_hFont) As HFONT
     192            Dim hOldFont = SelectObject(_PromptSys_hMemDC, _PromptSys_hFont) As HFONT
    185193            GetTextExtentPoint32(_PromptSys_hMemDC, " " As PCTSTR, 1, _PromptSys_FontSize)
    186194            GetTextMetrics(_PromptSys_hMemDC, tm)
     
    190198            ReleaseDC(hWnd,hDC)
    191199        Case WM_PAINT
    192             hDC = BeginPaint(hWnd,ps)
     200            hDC = BeginPaint(hWnd, ps)
     201/*
    193202            With _PromptSys_ScreenSize
    194203                BitBlt(hDC, 0, 0, .cx, .cy, _PromptSys_hMemDC, 0, 0, SRCCOPY)
     204*/
     205            With ps.rcPaint
     206                BitBlt(hDC, .left, .top, .right - .left, .bottom - .top, _PromptSys_hMemDC, .left, .top, SRCCOPY)
    195207            End With
    196208            DrawPromptBuffer(hDC, -1, 0)
     
    270282                SendMessage(hWnd, WM_SETFOCUS, 0, 0)
    271283            End If
     284        Case WM_IME_COMPOSITION
     285            Return _PromptSys_OnImeCompostion(hWnd, wParam, lParam)
    272286        Case WM_DESTROY
    273287            DeleteDC(_PromptSys_hMemDC)
     
    282296End Function
    283297
     298Function _PromptSys_OnImeCompostion(hwnd As HWND, wp As WPARAM, lp As LPARAM) As LRESULT
     299    If (lp And GCS_RESULTSTR) <> 0 Then
     300        Dim himc = ImmGetContext(hwnd)
     301        If himc = 0 Then
     302            'Debug
     303            Return 0
     304        End If
     305        Dim size = ImmGetCompositionString(himc, GCS_RESULTSTR, 0, 0) 'sizeはバイト単位
     306        Dim str = _System_malloc(size) As PTSTR
     307        If str = 0 Then
     308            'Debug
     309            Return 0
     310        End If
     311        ImmGetCompositionString(himc, GCS_RESULTSTR, str, size)
     312        ImmReleaseContext(hwnd, himc)
     313
     314        memcpy(VarPtr(_PromptSys_InputStr[_PromptSys_InputLen]), str, size)
     315        _PromptSys_InputLen += size
     316
     317        Dim tempStr As String(str, size \ SizeOf (Char))
     318        _System_free(str)
     319
     320        SendMessage(hwnd, WM_KILLFOCUS, 0, 0)
     321        PRINT_ToPrompt(tempStr)
     322        SendMessage(hwnd, WM_SETFOCUS, 0, 0)
     323
     324        Return 0
     325    Else
     326        Return DefWindowProc(hwnd, WM_IME_COMPOSITION, wp, lp)
     327    End If
     328End Function
     329
    284330Function PromptMain(dwData As Long) As Long
    285331    Dim i As Long
     
    297343
    298344    'Setup
    299     _PromptSys_ScreenSize.cx=GetSystemMetrics(SM_CXSCREEN)
    300     _PromptSys_ScreenSize.cy=GetSystemMetrics(SM_CYSCREEN)
     345    With _PromptSys_ScreenSize
     346        .cx = GetSystemMetrics(SM_CXSCREEN)
     347        .cy = GetSystemMetrics(SM_CYSCREEN)
     348    End With
    301349
    302350    'LogFont initialize
     
    315363        .lfQuality = DEFAULT_QUALITY
    316364        .lfPitchAndFamily = FIXED_PITCH
     365#ifdef UNICODE
     366        WideCharToMultiByte(CP_ACP, 0, "MS 明朝", 5, .lfFaceName, LF_FACESIZE, 0, 0)
     367#else
    317368        lstrcpy(.lfFaceName, "MS 明朝")
     369#endif
    318370    End With
    319371
    320     _PromptSys_hFont = CreateFontIndirect(ByVal VarPtr(_PromptSys_LogFont))
     372    _PromptSys_hFont = CreateFontIndirectA(ByVal VarPtr(_PromptSys_LogFont))
    321373
    322374    'Critical Section
     
    340392
    341393    'Create Prompt Window
    342     _PromptSys_hWnd=CreateWindowEx(WS_EX_CLIENTEDGE,atom As ULONG_PTR As PCSTR,"BASIC PROMPT",WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,0,0,GetModuleHandle(0),0)
     394    _PromptSys_hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, atom As ULONG_PTR As PCSTR, "BASIC PROMPT",
     395        WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
     396        0, 0, wcl.hInstance, 0)
    343397    ShowWindow(_PromptSys_hWnd, SW_SHOW)
    344398    UpdateWindow(_PromptSys_hWnd)
Note: See TracChangeset for help on using the changeset viewer.