Print Page | Close Window

Toolbox - MDI

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=4510
Printed Date: 20 January 2025 at 8:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbox - MDI
Posted By: venkyhyd
Subject: Toolbox - MDI
Date Posted: 29 June 2006 at 1:08am

Hi,

1. How can I make the Toolbox sample which is SDI based to MDI, when I try to add the features as specified in Toolbox sample to an MDI Applicaiton the application crashes. Toolbox sample provided by Toolkit Pro evaluation kit is using splitter window but I want to make the same using Dockable panes in MDI.
 
2. Does Toolkit pro support Image Manipulation in Toolbars.
 
Can you suggest me on this....help me in evaluating the ToolKit pro.
 
Thanks & regards
venky



Replies:
Posted By: Oleg
Date Posted: 29 June 2006 at 11:46am
Hi,
If application crashes, that mean you make something wrong :)
Attach code you tried and I will point to code need to change.


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


Posted By: venkyhyd
Date Posted: 07 July 2006 at 6:26am

Able to resolve the crash it works fine but now when i try to move the dock window to some position in mainframe and try double clicking on the window would dock it to the same position from where it was undocked but an image of the Window remain at the position where it was dragged or placed before docking. And this Window will get closed only if i click on the cross button of the Window that to not exactly on the cross but on the near by coordinates of the cross (ie. in and around the cross button).

I guess the mainframe is not getting Invalidated but calling Invalidate in the OnDockingPaneNotifyis not refreshing the Mainframe. Here is the code :
this is in OnCreate of Mainframe::
if (!InitCommandBars())

return -1;

CXTPPaintManager::SetTheme(xtpThemeOfficeXP);

CXTPCommandBars* pCommandBars = GetCommandBars();

 

CXTPToolBar* pStandardBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarTop);

if (!pStandardBar ||

!pStandardBar->LoadToolBar(IDR_MAINFRAME))

{

TRACE0("Failed to create toolbar\n");

return -1;

}

m_paneManager.InstallDockingPanes(this);

m_paneManager.SetTheme(xtpPaneThemeOffice);

pwndPane1 = m_paneManager.CreatePane(

IDR_PANE_OPTIONS, CRect(0, 0,200, 120), xtpPaneDockRight);

pwndPane1->SetTitle ("Draw");

CXTPDockingPane* pwndPaneEdit = m_paneManager.CreatePane(

3, CRect(0, 0,200, 120), xtpPaneDockBottom);

pwndPaneEdit->SetTitle(_T("Diagnostics Window"));

ResetToolboxItems();

CreateTaskPanel();

 
In OnDockingPaneNotify:
 

if (wParam == XTP_DPN_SHOWWINDOW)

{CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;

if (!pPane->IsValid())

{

if (pPane->GetID() == IDR_PANE_OPTIONS)

{

if (!m_wndTaskPanel.m_hWnd)

{

CreateTaskPanel();

}

pPane->Attach(&m_wndTaskPanel);

}

if (pPane->GetID() == 3)

{

if (!m_wndEdit.GetSafeHwnd())

{

VERIFY(m_wndEdit.CreateEx(WS_EX_STATICEDGE, _T("EDIT"), _T(""),

WS_CHILD|ES_AUTOVSCROLL|ES_MULTILINE, CRect(0, 0,200, 120), this, 0));

m_wndEdit.SetFont(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));

}

pPane->Attach(&m_wndEdit);

}

}

return TRUE; // handled

}

Invalidate();

return FALSE;

}



Posted By: Oleg
Date Posted: 07 July 2006 at 8:48am
Hello,
 
Call Attach method in OnDockingPaneNotify handler.


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


Posted By: venkyhyd
Date Posted: 11 July 2006 at 12:57am
hello I have already made a call to Attach in OnDockingPaneNotify, can you pinpoint where i shld call the Attach method.
Thanks
venky


Posted By: Oleg
Date Posted: 11 July 2006 at 9:49am
Hello,
 
Attach project here or send it to mailto:support@codejock.com - support@codejock.com , I will change it and send back.


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


Posted By: venkyhyd
Date Posted: 12 July 2006 at 1:06am
Hello
 
I could resolve the issue. As i was handling the Msg Loop as per my custom requirement, but not as per the MFC architecture.
 
Does XTreme Toolkit pro Support Windows 2003 Server?
 
Thanks


Posted By: SuperMario
Date Posted: 12 July 2006 at 9:42am
Yes, Windows 2003 Server is supported



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