Page 2 of 9
Re: Fwh 23.10 TGet another problem
Posted: Tue Nov 07, 2023 7:57 pm
by Horizon
nageswaragunupudi wrote:nageswaragunupudi wrote: Maybe your font set is problem?
Can you please clarify how to define fonts choosing Turkish Charset?
Got it, using CHARSET 162.
With this font definition I am able to see Turkish fonts for the above ASCII codes correctly
Code: Select all | Expand
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16 CHARSET 162
Is this the right way?
Hi Mr. Rao,
I'm sorry for being late in replying.
I don't know CHARSET 162 using to define Turkish Charset. I have started a few thread since 15 years.
https://forums.fivetechsupport.com/view ... 028#p64949
https://forums.fivetechsupport.com/view ... da3bea5028
https://forums.fivetechsupport.com/view ... 28#p233011
but I use this method to define Turkish Charset. I have a line in my make file like below
Code: Select all | Expand
$(OBJDIR)\font.c : $(FWDIR)\source\classes\font.prg
$(HBDIR)\bin\harbour $(FWDIR)\source\classes\font.prg /n \
/i$(FWDIR)\include;$(HBDIR)\include /d_DEFAULT_CHARSET_=1 /o$(OBJDIR)\font.c
Code: Select all | Expand
REQUEST HB_CODEPAGE_TRWIN
function Main()
HB_CDPSELECT( "TRWIN" )
...
return
Every time the fwh version is renewed, I delete all obj files and renew it again. I was able to solve the font problem only this way. I often "Verdana" font in my application defining like below as usual.
If there was a font definition problem, I should not have seen the Turkish characters previously entered in the TGet fields. However, I can see the previously entered Turkish character data. Only when I type Turkish characters on the keyboard while entering data, a question mark appears.
I should also say that there is no Turkish entry problem in GET MEMO fields.
Re: Fwh 23.10 TGet another problem
Posted: Wed Nov 08, 2023 4:48 pm
by Horizon
Re: Fwh 23.10 TGet another problem
Posted: Wed Nov 08, 2023 5:29 pm
by nageswaragunupudi
I will study this more and get back to you
Re: Fwh 23.10 TGet another problem
Posted: Sat Nov 11, 2023 5:43 pm
by Horizon
nageswaragunupudi wrote:I will study this more and get back to you
ok. thank you.
Re: Fwh 23.10 TGet another problem
Posted: Sat Nov 11, 2023 7:36 pm
by nageswaragunupudi
but I use this method to define Turkish Charset. I have a line in my make file like below
Code:
$(OBJDIR)\font.c : $(FWDIR)\source\classes\font.prg
$(HBDIR)\bin\harbour $(FWDIR)\source\classes\font.prg /n \
/i$(FWDIR)\include;$(HBDIR)\include /d_DEFAULT_CHARSET_=1 /o$(OBJDIR)\font.c
Instead, you can use the library as it is and set
at the beginning of your application in the Main() function.
This has the same effect of defining _DEFAULT_CHARSET_
Please see font.prg:
Code: Select all | Expand
DEFAULT nCharSet := ::nDefaultCharSet
#ifdef _DEFAULT_CHARSET_
DEFAULT nCharSet := _DEFAULT_CHARSET_
#endif
Re: Fwh 23.10 TGet another problem
Posted: Sun Nov 12, 2023 1:00 pm
by Horizon
nageswaragunupudi wrote:but I use this method to define Turkish Charset. I have a line in my make file like below
Code:
$(OBJDIR)\font.c : $(FWDIR)\source\classes\font.prg
$(HBDIR)\bin\harbour $(FWDIR)\source\classes\font.prg /n \
/i$(FWDIR)\include;$(HBDIR)\include /d_DEFAULT_CHARSET_=1 /o$(OBJDIR)\font.c
Instead, you can use the library as it is and set
at the beginning of your application in the Main() function.
This has the same effect of defining _DEFAULT_CHARSET_
Please see font.prg:
Code: Select all | Expand
DEFAULT nCharSet := ::nDefaultCharSet
#ifdef _DEFAULT_CHARSET_
DEFAULT nCharSet := _DEFAULT_CHARSET_
#endif
Yes, I have tried this and enough for displaying Turkish Charset.
but My Get problem is still continue.
Re: Fwh 23.10 TGet another problem
Posted: Tue Nov 14, 2023 6:46 pm
by Horizon
Re: Fwh 23.10 TGet another problem
Posted: Tue Nov 14, 2023 6:53 pm
by Antonio Linares
Dear Hakan,
Please build this test using just C language:
go.bat
Code: Select all | Expand
c:\bcc7\bin\brcc32 main.rc
c:\bcc7\bin\bcc32 -tW main.c main.res
main.exe
main.c
Code: Select all | Expand
#include <windows.h>
#include "resource.h"
INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {
case WM_INITDIALOG:
{
LPCWSTR lpString = "ÞÞß";
SetWindowText( hwndDlg, lpString );
}
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
EndDialog(hwndDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
case WM_CLOSE:
EndDialog(hwndDlg, 0);
return (INT_PTR)TRUE;
}
return (INT_PTR)FALSE;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
DialogBox(hInstance, MAKEINTRESOURCE(IDD_MYDIALOG), NULL, DialogProc);
return 0;
}
main.rc
Code: Select all | Expand
#include "resource.h"
// Turkish (Turkey) has a primary language ID of 0x1f and a SUBLANG ID of 0x01
LANGUAGE 0x1f, 0x01
IDD_MYDIALOG DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Sample Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,174,18,50,14
PUSHBUTTON "Cancel",IDCANCEL,174,35,50,14
END
resource.h
Re: Fwh 23.10 TGet another problem
Posted: Tue Nov 14, 2023 7:13 pm
by Horizon
Antonio Linares wrote:Dear Hakan,
Please build this test using just C language:
go.bat
Code: Select all | Expand
c:\bcc7\bin\brcc32 main.rc
c:\bcc7\bin\bcc32 -tW main.c main.res
main.exe
main.c
Code: Select all | Expand
#include <windows.h>
#include "resource.h"
INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {
case WM_INITDIALOG:
{
LPCWSTR lpString = "ÞÞß";
SetWindowText( hwndDlg, lpString );
}
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
EndDialog(hwndDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
case WM_CLOSE:
EndDialog(hwndDlg, 0);
return (INT_PTR)TRUE;
}
return (INT_PTR)FALSE;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
DialogBox(hInstance, MAKEINTRESOURCE(IDD_MYDIALOG), NULL, DialogProc);
return 0;
}
main.rc
Code: Select all | Expand
#include "resource.h"
// Turkish (Turkey) has a primary language ID of 0x1f and a SUBLANG ID of 0x01
LANGUAGE 0x1f, 0x01
IDD_MYDIALOG DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Sample Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,174,18,50,14
PUSHBUTTON "Cancel",IDCANCEL,174,35,50,14
END
resource.h
Hi Antonio,
I wish I could but I do not have bcc. I use MSVC 2022.
Re: Fwh 23.10 TGet another problem
Posted: Tue Nov 14, 2023 7:31 pm
by Antonio Linares
Here you have the Microsoft version:
go32.bat
Code: Select all | Expand
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
rc main.rc
cl main.c main.res /link user32.lib
main.rc
Code: Select all | Expand
#include <windows.h>
#include "resource.h"
// Turkish (Turkey) has a primary language ID of 0x1f and a SUBLANG ID of 0x01
LANGUAGE 0x1f, 0x01
IDD_MYDIALOG DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Sample Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,174,18,50,14
PUSHBUTTON "Cancel",IDCANCEL,174,35,50,14
END
main.c and resource.h are the same ones as in the previous example
Re: Fwh 23.10 TGet another problem
Posted: Tue Nov 14, 2023 8:38 pm
by Horizon
Re: Fwh 23.10 TGet another problem
Posted: Tue Nov 14, 2023 9:32 pm
by Antonio Linares
The used language is turkish, select the charset you need, does the dialog title looks fine ?
This example is not using FWH. This is pure C. Can we make it look fine ?
Re: Fwh 23.10 TGet another problem
Posted: Wed Nov 15, 2023 6:08 am
by Horizon
Antonio Linares wrote:The used language is turkish, select the charset you need, does the dialog title looks fine ?
This example is not using FWH. This is pure C. Can we make it look fine ?
Dear Antonio,
Code: Select all | Expand
Yes, I have tried this and enough for displaying Turkish Charset.
Code:
TFont():nDefaultCharSet := 1
but My Get problem is still continue.
What we are looking for? I do not any problem with displaying turkish characters (for examle TSay())
I have pressing Turkish characters in TGet() class. I do not use unicode, so there is FW_SetUnicode(.f.) at first lines of my application. I just wanted to clarify.
Re: Fwh 23.10 TGet another problem
Posted: Wed Nov 15, 2023 6:17 am
by Antonio Linares
Dear Hakan,
> Turkish characters are displayed as question mark in fwh 23.10. when FW_SetUnicode( .F. )
Was this working fine with FWH 23.07 ?
Re: Fwh 23.10 TGet another problem
Posted: Wed Nov 15, 2023 6:27 am
by Horizon
Antonio Linares wrote:Dear Hakan,
> Turkish characters are displayed as question mark in fwh 23.10. when FW_SetUnicode( .F. )
Was this working fine with FWH 23.07 ?
Yes.