Print Page | Close Window

My app is not working in Korean OS.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11552
Printed Date: 14 July 2025 at 11:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: My app is not working in Korean OS.
Posted By: Ashok
Subject: My app is not working in Korean OS.
Date Posted: 23 July 2008 at 11:10am

Hi,

   I am using Xtreme ToolkitPro v11.1.0 for my application and it is working fine in Windows Xp,Vista but it fails in korean OS. I have debugged in Korean OS it fails in the LoadFrame(). Whether it will work in korean OS or not. Please help me.



Replies:
Posted By: SuperMario
Date Posted: 23 July 2008 at 2:04pm
Do you use the Unicode version?


Posted By: Ashok
Date Posted: 24 July 2008 at 3:33am

Hi,

  No, my application is not Unicode version.


Posted By: Oleg
Date Posted: 24 July 2008 at 4:29am
Hi,
 
Set breakpoint in OnCreate, step while exit and check what code return -1.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 29 July 2008 at 9:41am

Hi,

  I found the place where the bug is, I have a toolbar which contains controlcombobox.

In OnCreate:
m_pFormatToolBar = (CXTPToolBar*)pCommandBars->Add(_T("Formatting"), xtpBarTop, RUNTIME_CLASS(CCGenTool));
    if (!m_pFormatToolBar || !m_pFormatToolBar->LoadToolBar(IDR_FORMAT_TOOLBAR_XP))
    {
        TRACE0("Failed to create Format toolbar\n");
        return -1;
    }
In OnCreateControl:
if (lpCreateControl->nID == IDC_FORMAT_ROTATION)
 {
  CControlFormatRotationComboBox* pFormatRotationCombo = new CControlFormatRotationComboBox();
  pFormatRotationCombo->SetDropDownListStyle();
  pFormatRotationCombo->SetWidth(52);
  pFormatRotationCombo->SetFlags(xtpFlagManualUpdate);
  lpCreateControl->pControl = pFormatRotationCombo;
  return TRUE;
 }
CControlFormatRotationComboBox is derived from CXTPControlComboBox
In the constructor of CControlFormatRotationComboBox , I have a code like this
CString sNum;
    for (int i = 0; i <= 360; i += 15)
    {
        sNum.Format(_T(" %d°"), i); // using the charmap special char
        AddString (sNum);
     }
While running the code in korean os, it fails in the statement where i have used the special character in formatting. Please help to resolve this issue.
Note: My application is not unicode version.
    }


Posted By: Oleg
Date Posted: 30 July 2008 at 7:57am
 
Hm.. are you sure its reason ? if you replace(_T(" %d°"), to (_T(" %d"), you don't see problem ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 31 July 2008 at 6:37am
Ya, if I do like this (_T(" %d"), it is working but I want to fill that combo with the values like this:
0°
1°
2° etc.,How?Please suggest.


Posted By: Oleg
Date Posted: 01 August 2008 at 2:39am

Try this

 
 CString sNum;
   for (int i = 0; i <= 360; i += 15)
   {
    sNum.Format(_T("%d"), i);
    sNum += (char)0xB0;
    pComboFind->AddString(sNum);
   }


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 05 August 2008 at 9:23am
Hi Oleg, Thanks a lot.


Posted By: mgoldshteyn
Date Posted: 05 August 2008 at 1:32pm
Originally posted by oleg oleg wrote:

Try this

 
 CString sNum;
   for (int i = 0; i <= 360; i += 15)
   {
    sNum.Format(_T("%d"), i);
    sNum += (char)0xB0;
    pComboFind->AddString(sNum);
   }
 
Why not just:
   sNum.Format(_T("%d%c"),i,'\xB0');
 
Michael Goldshteyn
 


Posted By: barobax
Date Posted: 07 August 2008 at 3:40pm
it's better and smaller than Oleg Code member_profile.asp?PF=3618&FID=112 - mgoldshteyn


Posted By: Oleg
Date Posted: 08 August 2008 at 6:20am
I didn't know where is contest :)

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 08 August 2008 at 9:45am
Anyway, as I said earlier my app is not a unicode version, I am forcibly doing like this
CStringW sNum;
 WCHAR pWidechar[256];
    for (int i = 0; i <= 360; i += 15)
    {
        sNum.Format(L"%d°", i);
  wcscpy_s(pWidechar,sizeof(pWidechar),sNum);      
  ::SendMessageW(GetListBoxCtrl()->GetSafeHwnd(), LB_ADDSTRING, 0, (LPARAM)pWidechar);
    }
It is working fine in release version but not in debug version, it breaks in GetListBoxCtrl() and throws as ntdll.dll!7c9378ae() ( no source code available for this it only shows the disassembly), how to solve this?


Posted By: Oleg
Date Posted: 08 August 2008 at 12:59pm
Hi,
if its ANSI application why you send Wide char with LB_ADDSTRING message. It will not work.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 11 August 2008 at 1:21am
Hi, The same is working fine in my release version, not in my debug version,why?


Posted By: Oleg
Date Posted: 11 August 2008 at 2:08am
try replace
wcscpy_s(pWidechar,sizeof(pWidechar),sNum);      
to
wcscpy_s(pWidechar,(sNum.Length() + 1) * sizeof(WCHAR),sNum);      


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 11 August 2008 at 3:35am
Hi Oleg, Thanks a lot.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net