We do not think the problem is with mdi-dialog or nonmodal dialogs. The problem should be due to reasons external to this.
We made this test program using mdi dialogs. We used a table "statesuni" in FWH Demo Server, so that you can test it yourself. Please copy this program to your samples folder and build with buildh.bat.
For testing, do not make any changes to this source and do not also use any external libraries like TMySql.
This is the structure of table "statesuni"
CREATE TABLE `statesuni` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(2) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL,
`name` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
We tested with two Unicode languages we know, i.e., Hindi and Telugu and we did not find any problems.
We request you to test with Chinese Unicode characters and let us have your feedback.
Test program:
#include "fivewin.ch"
#define AS_MDICHILD 1
#define AS_DIALOG 2
static oCn, oRs
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oMenu
FW_SetUnicode( .T. )
SetGetColorFocus()
oCn := FW_DemoDB()
oRs := oCn:RowSet( "statesuni" )
DEFINE WINDOW oWnd MDI TITLE "FWH18.08: DIALOG IN MDICHILD WINDOW"
DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 2007
DEFINE BUTTON OF oBar PROMPT "MDIDLG" CENTER ACTION CreateDialog( AS_MDICHILD )
DEFINE BUTTON OF oBar PROMPT "DIALOG" CENTER ACTION CreateDialog( AS_DIALOG )
DEFINE BUTTON OF oBar PROMPT "STRUCT" CENTER GROUP ACTION ;
memoedit( oCn:CreateTableSQL( "statesuni" ), "STATESUNI Structure" )
ACTIVATE WINDOW oWnd
oRs:Close()
oCn:Close()
return nil
//----------------------------------------------------------------------------//
static function CreateDialog( nAs )
local oDlg, oBrw, oFont, oBrush
local aGrad := {{1, CLR_WHITE, CLR_HBLUE }}
DEFINE BRUSH oBrush GRADIENT aGrad
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 500,500 PIXEL TRUEPIXEL FONT oFont TITLE "MDI-DLG" BRUSH oBrush
RELEASE FONT oFont
RELEASE BRUSH oBrush
@ 80,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oRs AUTOCOLS PICTURES "99" CELL LINES NOBORDER UPDATE
WITH OBJECT oBrw
:bChange := { || oDlg:Update() }
//
:CreateFromCode()
END
@ 20,60 GET oRs:Name SIZE 400,40 PIXEL OF oDlg UPDATE VALID ;
( oRs:Save(), oBrw:RefreshCurrent(), .t. )
oDlg:bGotFocus := { || oDlg:Update() }
if nAs == AS_MDICHILD
ACTIVATE DIALOG oDlg AS MDICHILD
elseif nAs == AS_DIALOG
ACTIVATE DIALOG oDlg CENTERED
endif
return oDlg
//----------------------------------------------------------------------------//
Our test results:
