Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtLabel Collapse All
Subject Author Date
YS Jang Aug 18, 2006 - 2:52 AM

HI.

I want to change the text of the Static Control that is declared CExtLabel.

I used the SetWindowText() but the text is broken in English OS with MUI(Japanese)
this problem only occurs at CExtLabel. Other controls is good.

ex)
CExtLabel m_StaticControl;

m_StaticControl.SetWindowText(English text); // Good Work. English OS with MUI(Japanese)
m_StaticControl.SetWindowText(Japanese text); // Text is broken. English OS with MUI(Japanese)



YS Jang Aug 18, 2006 - 3:11 AM

The text of all controls in CExtGroupBox is broken

Suhai Gyorgy Aug 18, 2006 - 7:04 AM

Hi!

In our application we call SetWindowText for CExtLabel with Hungarian text on English OS, without any problem.

I have a guess which you might try: Check in project properties whether the "Treat wchar_t as Built-in Type" setting is set to true or false. (In VS7.1 it’s under C++/Language.)
For us it works fine only when this setting is set to false (value "No"). Of course the used Prof-UIS lib has to have the same value set (I guess you don’t have to change that in Prof-UIS project properties as value "No" is default.) This might have nothing to do with your problem, but give it a try! :-)

Regards:
Chris.

YS Jang Aug 18, 2006 - 7:29 AM

-My Dialog is derived CExtResizableDialog
-Property:Clip Children, Clip Siblings = false
-Compile OS:Korean(Compile Mode: MBCS)
-Test OS:English with MUI
-Test Text:Japanese

My problem occurs CExtLabel but If i change to CStatic from CExtLabel, Good work!
CExtCheckBox and CExtButton occur the problem

YS Jang Aug 18, 2006 - 7:48 AM

My Dialog have GroupBoxes derived CExtGroupBox(Style:STYLE_CAPTION)
Ablsolutly, The problem(text is broken) occur...

then I tried to change the style to STYLE_FLAT from STYLE_CAPTION...
Good Work...

What’s wrong?..
How to resolve this problem?

Suhai Gyorgy Aug 18, 2006 - 8:33 AM

I think Clip Children, Clip Siblings properties should be set to true for your dialog’s properties and make sure that GroupBox has higher tab order value than those of the controls on that GroupBox.

YS Jang Aug 18, 2006 - 9:22 AM

Thanks...
In my dialog, The tab order of GroupBox is highest and I had tried that the property of dialog adjust

Technical Support Aug 18, 2006 - 12:22 PM

The OS on which the app is compiled has nothing to with the problem. If use any of complex languages like Japanese and want to display strings correctly on any NT OS, just use Unicode and you have no problems with this. If you want to support old Win9X platforms, you should use MBCS and run your application only on OS with target language. We use DrawText() GDI API for painting the text. This API does not display MBCS Japanese strings correctly on non-Japanese OSes or if the default non-Unicode OS language is not Japanese.

YS Jang Aug 18, 2006 - 9:18 PM

My project are consist of a EXE and DLLs.
I tried to change from MBCS to Unicode the one Dll with problem (no problem?)
A.exe, b.dll and c.dll are compiled to use MBCS and d.dll is compiled to use Unicode character set.

Both Debug and Release are Successfully and I executed My Application..

In Debug Mode, d.ll is created when I click the Button in A.exe
But Release Mode, d.dll is not Created.

<Sample code>
BOOL CSetup::CreateSetup()
{
CSetupDlg* pDlg;
pDlg = new CSetupDlg(); // In Release Mode, pDlg is NULL
if (!pDlg->Create(IDD_.........., this))
{
return FALSE;
}
return TRUE;
}




YS Jang Aug 19, 2006 - 1:34 AM

My project are consist of a EXE and DLLs.
I tried to change from MBCS to Unicode the one Dll with problem (no problem?)
A.exe, b.dll and c.dll are compiled to use MBCS and d.dll is compiled to use Unicode character set.

Both Debug and Release are Successfully and I executed My Application..

In Debug Mode, d.ll is created when I click the Button in A.exe
But Release Mode, d.dll is not Created.

<Sample code>
BOOL CSetup::CreateSetup()
{
CSetupDlg* pDlg;
pDlg = new CSetupDlg();
if (!pDlg->Create(IDD_.........., this))
{
return false;
}

CExtResDlg::Create()
{
g_ResourceManager->FindResourceHandle();
}

CExtResourceManager::FindResourceHandle()
{
HINSTANCE hInst = ::AfxFindResourceHandle();
//hInst is NULL(ReleaseMode)........In Debug Mode, is not NULL
}

Technical Support Aug 19, 2006 - 8:38 AM

If you use MFC and/or Prof-UIS in your EXE and DLLs and these modules are export methods and classes to each other, then you should switch to Unicode in all the projects.