Page 1 of 2
ButtonBmp problem with FWH2402
Posted: Wed Mar 06, 2024 6:27 pm
by richard-service
Hi
I use FWH2212 working fine.
When use FWH2402 appear Chinese word does not display syntax command REDEFINE
Code: Select all | Expand
REDEFINE BUTTONBMP oBtn[1] ID 301 OF ::oDlg ;
PROMPT "確 定" ;
TEXTRIGHT ;
BITMAP "BTN_Confirm24" ;
ACTION ( lOK := .T. , ::oDlg:End() )
REDEFINE BUTTONBMP oBtn[2] ID 302 OF ::oDlg ;
PROMPT "取 消" ;
CANCEL ;
TEXTRIGHT ;
BITMAP "BTN_Cancel24" ;
ACTION ( lOK := .F. , ::oDlg:End() )
REDEFINE BUTTONBMP oBtn[3] ID 303 OF ::oDlg ;
PROMPT "設 定" ;
TEXTRIGHT ;
BITMAP "BTN_SetPrinter24" ;
ACTION PrinterSetup()
This working fine below:
Code: Select all | Expand
@ 103, 0 BUTTONBMP ::oBut[1] OF ::oDlg ;
SIZE 50, 16 PIXEL ;
PROMPT "確定" ;
RESOURCE "BTN_Confirm24" ;
TOOLTIP "選取日期" ;
ACTION (::lOk := .T., ::oDlg:End() ) ;
CANCEL ;
TEXTRIGHT
@ 103, 50 BUTTONBMP ::oBut[2] OF ::oDlg ;
SIZE 50, 16 PIXEL ;
PROMPT "取消" ;
RESOURCE "BTN_Cancel24" ;
TOOLTIP "取消選取日期" ;
ACTION (::lOk := .F., ::oDlg:End() ) ;
CANCEL ;
TEXTRIGHT
I use .dll file not rc or res.
Re: ButtonBmp problem with FWH2402
Posted: Wed Mar 06, 2024 8:51 pm
by leandro
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 1:46 am
by richard-service
Yes, And very unstable.
This PROMPT empty space that only not show Chinese word
This PROMPT not empty space that crash my app
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 5:07 am
by nageswaragunupudi
Trying to reproduce the problem here
First sample from Source Code (not Resource)
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oBtn, oFont
FW_SetUnicode( .T. )
SetBalloon( .t. )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-24
DEFINE DIALOG oDlg SIZE 300,300 PIXEL TRUEPIXEL TITLE FWVERSION ;
FONT oFont
@ 50,50 BUTTONBMP oBtn OF oDlg ;
SIZE 150, 50 PIXEL ;
PROMPT "確定" ;
TOOLTIP "選取日期" ;
ACTION ( oDlg:End() ) ;
CANCEL ;
TEXTRIGHT
@ 150,50 BUTTONBMP oBtn OF oDlg ;
SIZE 150, 50 PIXEL ;
PROMPT "取消" ;
TOOLTIP "取消選取日期" ;
ACTION ( oDlg:End() ) ;
CANCEL ;
TEXTRIGHT
ACTIVATE DIALOG oDlg CENTERED
return nil
We do not see any problem here
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 5:26 am
by nageswaragunupudi
We see a problem here
This is the problem faced by Mr. Leandro also.
RC file used by us for testing:
Code: Select all | Expand
#include "..\include\winapi.ch"
#ifndef __64__
1 24 ".\winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif
test DIALOG 117, 94, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "XP theme aware Buttons Bitmap"
FONT 8, "MS Sans Serif"
{
PUSHBUTTON "", 10, 13, 18, 20, 17
DEFPUSHBUTTON "&OK", IDOK, 69, 95, 50, 16
PUSHBUTTON "", 20, 13, 43, 120, 30
}
Test program in Chinese:
Code: Select all | Expand
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFont
FW_SetUnicode( .T. )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20
DEFINE DIALOG oDlg RESOURCE "Test" TITLE FWVERSION FONT oFont
REDEFINE BUTTONBMP ID 10 OF oDlg ;
BITMAP "..\bitmaps\16x16\garrow.bmp"
REDEFINE BUTTONBMP ID 20 OF oDlg ;
BITMAP "..\bitmaps\32x32\paste.bmp" ;
PROMPT "取 消" TEXTRIGHT
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
Result:
Please give us sometime and we will get back to you with fix.
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 5:58 am
by nageswaragunupudi
What is observed till now is that the misbehavior is when FW_SetUnicode( .T. )
Request Mr. Leandro to set FW_SetUnicode( .F. ) and retry
We will work on fixing this problem
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 6:20 am
by nageswaragunupudi
This is working
Code: Select all | Expand
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFont, oBmp
FW_SetUnicode( .f. )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20
DEFINE DIALOG oDlg RESOURCE "Test" TITLE FWVERSION FONT oFont
REDEFINE BUTTONBMP ID 10 OF oDlg ;
BITMAP "..\bitmaps\16x16\garrow.bmp"
REDEFINE BUTTONBMP oBmp ID 20 OF oDlg ;
BITMAP "..\bitmaps\32x32\paste.bmp" ;
PROMPT "取 消" TEXTRIGHT
oBmp:lUnicode := .t.
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
RC file
Code: Select all | Expand
#include "..\include\winapi.ch"
#ifndef __64__
1 24 ".\winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif
test DIALOG 117, 94, 494, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "XP theme aware Buttons Bitmap"
FONT 8, "MS Sans Serif"
{
PUSHBUTTON "", 10, 13, 18, 20, 17
DEFPUSHBUTTON "&OK", IDOK, 69, 95, 50, 16
PUSHBUTTON "", 20, 13, 43, 420, 30
}
We will fix the issue and get back to you soon
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 6:58 am
by richard-service
nageswaragunupudi wrote:Trying to reproduce the problem here
First sample from Source Code (not Resource)
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oBtn, oFont
FW_SetUnicode( .T. )
SetBalloon( .t. )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-24
DEFINE DIALOG oDlg SIZE 300,300 PIXEL TRUEPIXEL TITLE FWVERSION ;
FONT oFont
@ 50,50 BUTTONBMP oBtn OF oDlg ;
SIZE 150, 50 PIXEL ;
PROMPT "確定" ;
TOOLTIP "選取日期" ;
ACTION ( oDlg:End() ) ;
CANCEL ;
TEXTRIGHT
@ 150,50 BUTTONBMP oBtn OF oDlg ;
SIZE 150, 50 PIXEL ;
PROMPT "取消" ;
TOOLTIP "取消選取日期" ;
ACTION ( oDlg:End() ) ;
CANCEL ;
TEXTRIGHT
ACTIVATE DIALOG oDlg CENTERED
return nil
We do not see any problem here
Yes, I know. I said no problem.
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 7:15 am
by richard-service
nageswaragunupudi wrote:This is working
Code: Select all | Expand
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFont, oBmp
FW_SetUnicode( .f. )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20
DEFINE DIALOG oDlg RESOURCE "Test" TITLE FWVERSION FONT oFont
REDEFINE BUTTONBMP ID 10 OF oDlg ;
BITMAP "..\bitmaps\16x16\garrow.bmp"
REDEFINE BUTTONBMP oBmp ID 20 OF oDlg ;
BITMAP "..\bitmaps\32x32\paste.bmp" ;
PROMPT "取 消" TEXTRIGHT
oBmp:lUnicode := .t.
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
RC file
Code: Select all | Expand
#include "..\include\winapi.ch"
#ifndef __64__
1 24 ".\winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif
test DIALOG 117, 94, 494, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "XP theme aware Buttons Bitmap"
FONT 8, "MS Sans Serif"
{
PUSHBUTTON "", 10, 13, 18, 20, 17
DEFPUSHBUTTON "&OK", IDOK, 69, 95, 50, 16
PUSHBUTTON "", 20, 13, 43, 420, 30
}
We will fix the issue and get back to you soon
Dear Mr.Rao
I just to test my code below:
Code: Select all | Expand
FW_SetUnicode( .T. )
SET RESOURCES TO 'WinCrane365.dll'
......
REDEFINE BUTTONBMP oBmp ID 20 OF oDlg ;
BITMAP "..\bitmaps\32x32\paste.bmp" ;
PROMPT "取 消" TEXTRIGHT
oBmp:lUnicode := .t.
Add oBmp:lUnicode := .t. working find.
There's no way I could spend too much time adding this.
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 7:31 am
by Antonio Linares
Dear Richard,
We are working to solve it asap
We apologize for these inconveniencies
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 8:11 am
by nageswaragunupudi
Antonio Linares wrote:Dear Richard,
We are working to solve it asap
We apologize for these inconveniencies
We do not expect you to do that.
We will provide an easy fix for you.
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 8:18 am
by nageswaragunupudi
This problem appears only when both AppIsThemed() and FW_SetUnicode() is set to .T.
In all other cases it is working fine.
Now we request you to apply the following fix and let us know if everything is working fine.
Please open \fwh\source\classes\buttonb.prg
Please locate this method
Code: Select all | Expand
METHOD ReDefine( nId, bAction, oWnd, nHelpId, cMsg,;
lUpdate, bWhen, bValid, cPrompt, lCancel, cBitmap, cPosText, cToolTip, lGDIP ) CLASS TButtonBmp
DEFAULT cPrompt := "", cPosText := ::cPosDefault, lGDIP := .F.
::LoadBitmap( cBitmap )
::cPosText = Upper( cPosText )
::cToolTip = cToolTip
::lGDIP = lGDIP
return ::Super:Redefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen,;
bValid, cPrompt, lCancel )
Insert this line
as indicted below:
Code: Select all | Expand
METHOD ReDefine( nId, bAction, oWnd, nHelpId, cMsg,;
lUpdate, bWhen, bValid, cPrompt, lCancel, cBitmap, cPosText, cToolTip, lGDIP ) CLASS TButtonBmp
DEFAULT cPrompt := "", cPosText := ::cPosDefault, lGDIP := .F.
::LoadBitmap( cBitmap )
::cPosText = Upper( cPosText )
::cToolTip = cToolTip
::lGDIP = lGDIP
::lUnicode = oWnd:lUnicode // <-- INSERT THIS LINE HERE
return ::Super:Redefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen,;
bValid, cPrompt, lCancel )
Please use this modified buttonb.prg and provide us your feedback.
Thank you both
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 8:36 am
by richard-service
nageswaragunupudi wrote:This problem appears only when both AppIsThemed() and FW_SetUnicode() is set to .T.
In all other cases it is working fine.
Now we request you to apply the following fix and let us know if everything is working fine.
Please open \fwh\source\classes\buttonb.prg
Please locate this method
Code: Select all | Expand
METHOD ReDefine( nId, bAction, oWnd, nHelpId, cMsg,;
lUpdate, bWhen, bValid, cPrompt, lCancel, cBitmap, cPosText, cToolTip, lGDIP ) CLASS TButtonBmp
DEFAULT cPrompt := "", cPosText := ::cPosDefault, lGDIP := .F.
::LoadBitmap( cBitmap )
::cPosText = Upper( cPosText )
::cToolTip = cToolTip
::lGDIP = lGDIP
return ::Super:Redefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen,;
bValid, cPrompt, lCancel )
Insert this line
as indicted below:
Code: Select all | Expand
METHOD ReDefine( nId, bAction, oWnd, nHelpId, cMsg,;
lUpdate, bWhen, bValid, cPrompt, lCancel, cBitmap, cPosText, cToolTip, lGDIP ) CLASS TButtonBmp
DEFAULT cPrompt := "", cPosText := ::cPosDefault, lGDIP := .F.
::LoadBitmap( cBitmap )
::cPosText = Upper( cPosText )
::cToolTip = cToolTip
::lGDIP = lGDIP
::lUnicode = oWnd:lUnicode // <-- INSERT THIS LINE HERE
return ::Super:Redefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen,;
bValid, cPrompt, lCancel )
Please use this modified buttonb.prg and provide us your feedback.
Thank you both
Dear Mr.Rao
Now it's working.
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 9:09 am
by nageswaragunupudi
Now it's working.
Glad to know.
Mr. Leandro
Can you too please test and provide your feedback?
Re: ButtonBmp problem with FWH2402
Posted: Thu Mar 07, 2024 2:02 pm
by leandro
Mr. Rao, Antonio gracias por responder
Antonio te molesto si me envías las libs con el ajuste que menciona Mr. Rao, ya que al agregar el buttonb.prg modificado al proyecto de fivedit, sale el siguiente error:
Code: Select all | Expand
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'BUTTONB.OBJ'
Link Error
no hemos podido comprobar si es la solución
, de antemano gracias