My app is not working in Korean OS. |
Post Reply |
Author | |
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
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.
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Do you use the Unicode version?
|
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
Hi, No, my application is not Unicode version.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Set breakpoint in OnCreate, step while exit and check what code return -1.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
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.
} |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
Hi Oleg, Thanks a lot.
|
|
mgoldshteyn
Groupie Joined: 30 December 2007 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Why not just:
sNum.Format(_T("%d%c"),i,'\xB0');
Michael Goldshteyn
|
|
barobax
Senior Member Joined: 07 May 2008 Status: Offline Points: 117 |
Post Options
Thanks(0)
|
it's better and smaller than Oleg Code mgoldshteyn
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
I didn't know where is contest :)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
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? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
if its ANSI application why you send Wide char with LB_ADDSTRING message. It will not work.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
Hi, The same is working fine in my release version, not in my debug version,why?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
try replace
wcscpy_s(pWidechar,sizeof(pWidechar),sNum);
to
wcscpy_s(pWidechar,(sNum.Length() + 1) * sizeof(WCHAR),sNum); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
Hi Oleg, Thanks a lot.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |