Nemprogresssettext Lib "nnotesws.dll"

  • Автор темы allex
  • Дата начала
A

allex

Гость
#1
Всем доброго дня!
Кто-нито победил ввод рускоязычного текста в прогресс бар

<div class="sp-wrap"><div class="sp-head-wrap"><div class="sp-head folded clickable">Пример кода</div></div><div class="sp-body"><div class="sp-content"><!--shcode--><pre><code class='vb'>Declare Function NEMProgressBegin Lib "nnotesws.dll" ( ByVal wFlags As Integer ) As Long
Declare Sub NEMProgressEnd Lib "nnotesws.dll" ( ByVal hwnd As Long )
Declare Sub NEMProgressSetBarPos Lib "nnotesws.dll" ( ByVal hwnd As Long, ByVal dwPos As Long)
Declare Sub NEMProgressSetBarRange Lib "nnotesws.dll" ( ByVal hwnd As Long, ByVal dwMax As Long )
Declare Sub NEMProgressSetText Lib "nnotesws.dll" ( ByVal hwnd As Long, ByVal pcszLine1 As String, _
ByVal pcszLine2 As String )
Const NPB_TWOLINE% = 1

Class ProgressBar
Private hwnd As Long

Sub New (BarRange As Long)
On Error GoTo ErrorHandler

Me.hwnd = NEMProgressBegin (NPB_TWOLINE)

Call NEMProgressSetBarRange (Me.hwnd, BarRange)

Exit Sub
ErrorHandler:
strErrMessage_rep = "Ошибка " & Error$ & " выполняемая процедура " & GetThreadInfo(10) &" текущая процедура " & GetThreadInfo(1) & ", в строке " & CStr(Erl)
Print strErrMessage_rep

End Sub[/CODE]
BarMsg="Заголовок"
UpdMsg = "Обработанные данные"
Call RefreshProgress.UpdateProgressText (BarMsg, UpdMsg)

В таком виде пишутся "кракозябры"
 

hosm

* so what *
18.05.2009
2 442
9
42
Kiev, Ukraine
#3
<div class="sp-wrap"><div class="sp-head-wrap"><div class="sp-head folded clickable">возможно, так</div></div><div class="sp-body"><div class="sp-content">
Код:
'функции преобразования строк
Const OS_TRANSLATE_NATIVE_TO_LMBCS = 0 'Translate platform-specific to LMBCS */
Const OS_TRANSLATE_LMBCS_TO_NATIVE = 1 'Translate LMBCS to platform-specific */
Const OS_TRANSLATE_LOWER_TO_UPPER = 3 'current int'l case table */
Const OS_TRANSLATE_UPPER_TO_LOWER = 4 'current int'l case table */
Const OS_TRANSLATE_UNACCENT = 5 'int'l unaccenting table */
Const OS_TRANSLATE_LMBCS_TO_ASCII_DOS = 11
Const OS_TRANSLATE_LMBCS_TO_ASCII = 13

Declare Sub OSTranslate Lib "nnotes.dll" Alias "OSTranslate"( Byval mode As Integer, Byval strIn As String, Byval lenIn As Integer, Byval strOut As String, Byval lenOut As Integer )
Let ascii = "строка"
Let tmp0=Len(ascii)		
Let tmp1=Len(ascii)*2
Let Prompt = Space(Len(ascii)*2)
Call OSTranslate( OS_TRANSLATE_NATIVE_TO_LMBCS, ascii, tmp0, Prompt, tmp1 )
Call NemProgressSetText( hwnd, Title, Prompt)
 

rinsk

Well-Known Member
Lotus team
12.11.2009
895
84
Казань
#4
Всем доброго дня!
Кто-нито победил ввод рускоязычного текста в прогресс бар
......
В таком виде пишутся "кракозябры"
Что бы кракозябр небыло - практически везде в вызовах API надо юзать Lmbcs String:
Declare Public Sub NEMProgressSetText Lib "nnotesws.dll" ( Byval hwnd As Long, Byval pcszLine1 As Lmbcs String, Byval pcszLine2 As Lmbcs String )