![]() |
Create XML layot for RC |
Post Reply
|
| Author | |
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Topic: Create XML layot for RCPosted: 09 February 2006 at 4:55am |
|
Hello, I want to load few pane layots from RC. I used SaveToFile() to create xml files. Then I added files to resources and trying to load it within LoadFromNode(). But it failed. Am I doing something wrong? Thank you! Tanya |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 February 2006 at 1:18pm |
|
Hello, please show code you tring. Check Pane sample - OnLoadFromResource show how to load it from resource. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 February 2006 at 12:26am |
|
Hi Oleg, I am not at work right now,but it was exactly the sample I used. I just did a copy of this function and it fails on LoadFromNode(). I think the question is - how to create XML in a correct format. I used SaveToFile() function ( as in Pane sample ) for creation. It works great with LoadFromFile(), but not with LoadFromNode(). When I opened XML file from the sample RC and another XML from SaveToFile() (even from the same sample), I saw different formats. (I work on WinXP vs2003 ) Thank you, Tanya |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 February 2006 at 1:15am |
|
Hello, Format not a problem - XMLPropExchange supports both formats. guesss you forgot something - may be you copied code from sample and not changed main node name - if (pLayout->LoadFromNode(xmlRootPtr, _T("Common")))
check that instead of "Common" you have main root of your XML. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 February 2006 at 1:29am |
|
Just tried to reproduce and think the problem was in xmlDocPtr->get_documentElement(&xmlRootPtr); that returns incorrect node. try this code instead: LPCTSTR lpszResourceName = MAKEINTRESOURCE(IDR_SPIRAL); HINSTANCE hInst = AfxGetInstanceHandle(); HGLOBAL hGlobal = LoadResource(hInst, hRsrc); LPCSTR pData = (LPCSTR)LockResource(hGlobal); CXTPPropExchangeXMLNode px(TRUE, NULL, _T("DockingPaneLayouts")); if (pLayout->DoPropExchange(&pxCommon)) } UnlockResource(hGlobal);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 February 2006 at 3:00pm |
|
Oleg, Thank you very-very much for your help! It works perfect with your changes!
Tanya
|
|
![]() |
|
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 February 2006 at 6:57am |
|
Hi Oleg, I have a bug from our QA :( This function doesn't work on Win2000 sp4. Load and Save to xml-file works OK. Load and Save to registry also. Only the resource problem. Please see if you can help.
Thanks, Tanya |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 February 2006 at 11:54am |
|
Hello, I just tried modify our pane sample 2006-02-28_115238_PaneSample.zip
and don't see problem with win 2000, can you please ask your QA to test our attached sample if it has problem with Windows 2000
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 March 2006 at 5:34am |
|
Hi Oleg, I tried to run this sample on the same computer. But on another 2000 it was OK. So I installed it on a bad. And problem was fixed. Thanks, |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 March 2006 at 7:39am |
|
Do you use Visual Studio 2003 to compile it? |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 March 2006 at 7:40am |
|
Yes
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 March 2006 at 8:58am |
|
I can't reproduce it with even "clear" Windows 2000 :( May be something with msxml... not sure, Can you ask them to try to debug into px.LoadFromString and check what line failed. :( |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2006 at 6:47am |
|
Hi Oleg, It was very agent bug. And I didn’t have a time to debug, Because all these computers are always busy. So I decided to remove all the “load from resource” issue. All I need is to have 4 layouts (not in XML file that user can see and change). And let user to switch between them. So I created the layouts inside my program. Like Run and Editor Mode in the Pane Sample. And now I have a crash. Scenario –
Please try to help me as fast as possible. Thanks, Tanya |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2006 at 10:44am |
|
I can't reproduce it also. What version of Toolkit do you have? Better open issue in issuetrack for faster response. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Tanya
Newbie
Joined: 09 February 2006 Location: Israel Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 March 2006 at 4:52am |
|
I have the last version - 9.81 Very strange that you can't reproduce. 2. DoubleClick on Pane 2 to make it Float 3. Go to Layout->Run Mode Crash in the function - Line- Here is a stack dump: > ToolkitPro981vc71D.dll!CXTPDockingPaneMiniWnd::OnS etFocus(CWnd * pOldWnd=0x016ed9b0) Line 381 + 0x1c C++
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 March 2006 at 11:42am |
|
yes, see it now :( Please replace two methods: void CXTPDockingPaneLayout::Free() while (!m_lstStack.IsEmpty()) m_lstPanes.RemoveAll(); memset(m_wndPanels, 0, sizeof(m_wndPanels)); and void CXTPDockingPaneMiniWnd::OnSetFocus(CWnd* pOldWnd) if (m_pTopContainer == 0) if (!m_pLayout || !m_pLayout->IsValid()) CXTPDockingPaneBaseList lst; if (lst.GetCount() == 1)
Thank you. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
guywmustang
Newbie
Joined: 17 April 2006 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 May 2006 at 2:08pm |
|
Has this error been fixed since version 9.81 because I have had the same crash. I need to know if upgrading codejock will solve this problem, as it is a large bug for my software when trying to restore the layout.
|
|
![]() |
|
guywmustang
Newbie
Joined: 17 April 2006 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 May 2006 at 3:56pm |
|
<bump> |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 May 2006 at 4:37pm |
|
Hi, Yes, in 10.1.1 it was fixed. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |