Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - My app is not working in Korean OS.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

My app is not working in Korean OS.

 Post Reply Post Reply
Author
Message
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Topic: My app is not working in Korean OS.
    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.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2008 at 2:04pm
Do you use the Unicode version?
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2008 at 3:33am

Hi,

  No, my application is not Unicode version.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post 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.
    }
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2008 at 9:23am
Hi Oleg, Thanks a lot.
Back to Top
mgoldshteyn View Drop Down
Groupie
Groupie


Joined: 30 December 2007
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgoldshteyn Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post Posted: 07 August 2008 at 3:40pm
it's better and smaller than Oleg Code mgoldshteyn
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2008 at 6:20am
I didn't know where is contest :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2008 at 1:21am
Hi, The same is working fine in my release version, not in my debug version,why?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2008 at 3:35am
Hi Oleg, Thanks a lot.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.