I have no idea how to set mines as yours. I am just runing your example
I have no idea how to set mines as yours. I am just runing your example
TMultiGet():bLostFocus := {|o, hWndGetFocus|Change_TMultiGet_Result(o)}
@ 15,15 get oGet1 var cVar1 MEMO;
size 200,40 of oDlg pixel
FUNCTION Change_TMultiGet_Result(o)
LOCAL cText := o:GetText()
cText := UTF8toAnsi(cText)
o:SetText(cText)
RETURN@ 15,15 get oGet1 var cVar1 MEMO;
size 200,40 of oDlg pixel
oGet1:bLostFocus := {|o, hWndGetFocus|Change_TMultiGet_Result(o)}
FUNCTION Change_TMultiGet_Result(o)
LOCAL cText := o:GetText()
? "Before", FW_SetUnicode(), IsUTF8(cText), o:lUnicode, cText, StrToHex( cText, " " )
cText := UTF8toAnsi(cText)
? "After", FW_SetUnicode(), IsUTF8(cText), o:lUnicode, cText, StrToHex( cText, " " )
Eval( o:bSetGet, cText)
cText := o:GetText()
? "After than", FW_SetUnicode(), IsUTF8(cText), o:lUnicode, cText, StrToHex( cText, " " ) <-------------- I can not change the value. Why?
RETURNTMultiGet():bLostFocus := {|o, hWndGetFocus|Change_TMultiGet_Result(o)}Try with public or private cVar1
Antonio Linares wrote: Try with public or private cVar1Sory, I do not understand.Please give me some example.
public cVar1
@ 15,15 get oGet1 var cVar1 MEMO;
size 200,40 of oDlg pixel
oGet1:bLostFocus := {|o, hWndGetFocus|Change_TMultiGet_Result(o)}
FUNCTION Change_TMultiGet_Result(o)
LOCAL cText := o:GetText()
? "Before", FW_SetUnicode(), IsUTF8(cText), o:lUnicode, cText, StrToHex( cText, " " )
cText := UTF8toAnsi(cText)
? "After", FW_SetUnicode(), IsUTF8(cText), o:lUnicode, cText, StrToHex( cText, " " )
Eval( o:bSetGet, cText)
cVar1 = cText
cText := o:GetText()
? "After than", FW_SetUnicode(), IsUTF8(cText), o:lUnicode, cText, StrToHex( cText, " " ) <-------------- I can not change the value. Why?
RETURNThank you very much Antonio,
If there were only one GET with MEMO, this process wouldn't be necessary. I don't think this solution makes sense to me.
You could try it this way:
oGet1:bLostFocus := {|o, hWndGetFocus|Change_TMultiGet_Result(o,@cVar1)}
Antonio Linares wrote: You could try it this way:Hi Antonio,
oGet1:bLostFocus := {|o, hWndGetFocus|Change_TMultiGet_Result(o,@cVar1)}
Dear Hakan,
I am just trying to understand what is happening and trying to help you.
I don't know where the problem comes from as I can not reproduce it here, sorry.
Hi Antonio,
I would like to remind you that this error occurred when I added a manifest.
Hi again,
Sorry for delay. I'm in vacation.
I don't use TMultiGet for my apps. I use RTF control for this.
I will look your problem and I will write a result in a few days.
Hi ertan.
Thank you very much.
I have an example with rc. just compile it with rc and without rc.
The cVar1 variable is not the same in both compilations. I'm not using Unicode in my application. Pressing ฤ in the TMultiget command should return D0. When I use a theme (with the manifest), the result is Unicode C4 9E. I don't want a Unicode result.
Dear Hakan,
Can you send your samples and executables to my e-mail?
ertan{underscore]ozturk[at]yahoo[dot]com
#include "FiveWin.ch"
request HB_CODEPAGE_UTF8
request HB_CODEPAGE_UTF16LE
REQUEST HB_CODEPAGE_TRWIN
Function Main()
Local oDlg, oFont
Local oGet1
local cVar1 := space(200)
HB_CDPSELECT( "TRWIN" )
FW_SetUnicode( .f. )
TFont():nDefaultCharSet := 162
? HB_CDPUNIID(), GetACP(), GetOEMCP()
oFont := TFont():New("Verdana", 0, -11)
DEFINE DIALOG oDlg SIZE 500,150 PIXEL ;
FONT oFont TITLE "Sample" ;
STYLE nOr( WS_OVERLAPPEDWINDOW ) transparent
@ 15,15 get oGet1 var cVar1 MEMO;
size 200,40 of oDlg pixel
@ 60, 15 BUTTON "CHECK" SIZE 40, 10 PIXEL OF oDlg ;
ACTION MsgInfo( ;
"FW_SetUnicode(): " + cValToChar(FW_SetUnicode()) + CRLF + CRLF + ;
"IsUTF8(cVar1): " + cValToChar(IsUTF8(cVar1)) + CRLF + CRLF + ;
"oGet1:lUnicode: " + cValToChar(oGet1:lUnicode) + CRLF + CRLF + ;
"oDlg:lUnicode: " + cValToChar(oDlg:lUnicode) + CRLF + CRLF + ;
"oGet1/TMultiGet(): " + cVar1 + " - " + StrToHex( cVar1, " " ) ;
)
ACTIVATE DIALOG oDlg CENTER
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( GETACP ) { hb_retni( GetACP() ); }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }
#pragma ENDDUMPico ICON "./../ICONS/fivewin.ico"
#ifndef __64__
1 24 "WinXP/WindowsXP.Manifest"
#else
1 24 "WinXP/WindowsXP.Manifest64"
#endif