Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
tera tera
|
Sep 10, 2009 - 7:38 PM
|
Hello. I want to realize the following menus.
Please teach a good method OR
|
|
David Wiseman
|
Sep 10, 2009 - 6:41 PM
|
G’day support: Is it possible to control the style of a docked window as it docks, so that it doesn’t assume the style of the frame? As an example, in the SDIDOCVIEW Sample, I have set the Main Frame window style as WS_EX_LAYERED to get a semi-tranparent window, but would like the toolbars to remain opaque when they dock with the frame. (When undocked, they are opaque, but as they dock, they seem to take the style of the Frame.) Many thanks, Dave
|
|
Technical Support
|
Sep 11, 2009 - 7:22 AM
|
There are two types of layered windows though both are just windows with the WS_EX_LAYERED extended window style:
1) Simple layered windows with equal transparency for each pixel. These windows are initialized with the SetLayeredWindowAttributes() API. They are exactly like classic opaque windows, but they support transparency for all the window pixels and all the pixels can use only equal transparency. They may contain child windows.
2) Per-pixel transparent layered windows. These layered windows are very specific. They initialized with the UpdateLayeredWindow() API which assigns bitmap with per-pixel alpha channel to the layered window. The size of the layered window and bitmap size must be equal. As result, the bitmap is displayed on the screen with per-pixel transparency. The per-pixel transparent layered windows should not contain children windows and they does not use the WM_PAINT message. You should use the UpdateLayeredWindow() API to assign new per-pixel transparent bitmap. Nevertheless per-pixel transparent layered windows are also based on the HWND window handle, they cannot be compared with classic opaque window or simple layered windows.
Both types of layered windows should be used for displaying some small information on the screen. You should not make some big main frame window layered if it contains a lot of toolbar and resizable control bars. The simple layered windows does not allow your toolbars be opaque when entire main frame window is transparent. The per-pixel transparent layered windows are incompatible with MFC frames with children toolbars.
|
|
Arjan
|
Sep 9, 2009 - 4:41 AM
|
Hello,
In an attempt to create an application similar to the Prof-UIS sample "FormEditor" we came across 2 things, of which 1 is possibly a decided-by-design.
Basically, our application would like to paint a dialog and its controls to a memory-DC.
1)
However, we noticed that sending a PrintClient-message to a CExtEdit results in the drawing of the edit-control on a DC, but without the static-text.
After examining the routines, we noticed that the OnPaint-handler draws the text directly, whereas routines like PrintClient are unaware of any text to draw.
How can we solved this ?
(draw a CExtEdit on a memory-DC)
2)
We’re assuming the following is decided-by-design, but any suggestions/corrections/comments are welcome ofcourse.
Painting of the non-client-area for controls like CExtButton, CExtComboBox, CExtDataPicker, CExtLabel, CExtSpin, etc. isn’t done by the controls itself.
(with nc-area for these controls I refer to window-styles like Border, ThickFrame, ClientEdge, etc.)
We’re assuming this is mostly because Prof-UIS-skins aren’t intended to be used in combination with window-styles.
(Interestingly enough, CExtEdit doesn’t draw text, but does draw nc-area if requested)
The problem when trying to print the nc-area of a control to a specific DC, is that messages like Print/PrintClient can’t be used.
This, since these messages are captured and handled by the Prof-UIS controls (which, obviously, is exactly what we would like...if only it included the nc-area as well).
We solved this by drawing all controls twice...once by sending a PrintClient-message to the pre-Prof-UIS-window-procedure for the non-client-area....followed by sending a PrintClient-message to the control itself for the client-area.
Thanks in advance,
Arjan Lukkesen
Ellips B.V.
|
|
Arjan
|
Sep 17, 2009 - 2:22 AM
|
Thank you for reply, it works. Sorry I wasn’t able to test it right away, but I just did, and it solves the problems we’ve encountered. Also thank you for checking other controls, and fixing the ComboBox aswell.
|
|
Technical Support
|
Sep 10, 2009 - 2:39 AM
|
The CExtEditBase class and all classes derived from it look like they really have some window surface printing issues. But the real problem is hidden in the CExtED template class. To fix the editor text printing issue, please update the source code for the CExtED::WindowProc() virtual method: virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch( message )
{
case WM_PRINT:
case WM_PRINTCLIENT:
{
_BED::WindowProc(message, wParam, lParam);
CDC * pDC = CDC::FromHandle( (HDC) wParam );
CExtEditBase::stat_PrintClient( OnQueryWindowEnabledState(), m_bMouseOver, message, lParam, this, this, pDC );
return (!0L);
}
break;
case WM_TIMER:
{
if( wParam == __EXT_EDIT_UPDATE_TIMER )
{
POINT pt;
if( IsWindowVisible()
&& ::GetCursorPos( &pt )
)
{
bool bOldMouseOver = m_bMouseOver;
CRect rectItem;
GetWindowRect( &rectItem );
if( !rectItem.PtInRect(pt) )
{
KillTimer( __EXT_EDIT_UPDATE_TIMER );
m_bMouseOver = false;
}
else
if( ::WindowFromPoint( pt ) == m_hWnd )
m_bMouseOver = true;
if( bOldMouseOver != m_bMouseOver )
_PostRedraw();
}
return 0L;
}
}
break;
case WM_SETFOCUS:
case WM_KILLFOCUS:
{
LRESULT lRes = _BED::WindowProc(message, wParam, lParam);
_PostRedraw();
return lRes;
}
break;
case WM_SETCURSOR:
{
if( HIWORD( lParam ) == WM_MOUSEMOVE )
{
CRect rcWnd;
GetWindowRect( &rcWnd );
if( rcWnd.PtInRect( GetCurrentMessage()->pt ) )
{
SetTimer( __EXT_EDIT_UPDATE_TIMER, __EXT_EDIT_UPDATE_TIMER_PERIOD, NULL );
SendMessage( WM_TIMER, __EXT_EDIT_UPDATE_TIMER, 0L );
}
}
}
break;
case WM_NCPAINT:
{
CWindowDC dc( this );
_DoPaintNC( &dc );
return 0L;
}
break;
}
return _BED::WindowProc(message, wParam, lParam);
}
Common controls like buttons and combo boxes do not have non-client areas. As a result, the classes like CExtButton and code>CExtComboBox</code> completely repaint the common controls for theming them and do not affect their non-client areas.
|
|
Arjan
|
Sep 11, 2009 - 7:07 AM
|
Thank you for your reply.
Eventhough I didn’t notice a change in the printing of a CExtEdit after inserting "_BED::WindowProc(message, wParam, lParam);" in the WindowProc function of the CExtEd template,. I’m guessing it could possibly be a solution since when debugging, i did notice that this caused to draw the text, which then was removed by the painting done by stat_PrintClient. Perhaps I used a wrong value for lParam ?
However, I was hoping for PrintClient to have the follow the same principle as CExtEditBase::OnPaint(), which it basically first lets Windows paint the edit-control, to then overdraw the text.
Thanks in advance, Arjan Lukkesen Ellips B.V.
|
|
Technical Support
|
Sep 11, 2009 - 10:42 AM
|
Yes, we found that the previous solution works only in particular situations. We found a better solution. It consists of two steps. First, please update the following part of the CExtED::WindowProc() virtual method:
case WM_PRINT:
case WM_PRINTCLIENT:
{
_BED::WindowProc(message, wParam, (lParam&(~(PRF_NONCLIENT|PRF_CHECKVISIBLE))|PRF_CLIENT|PRF_ERASEBKGND) );
CDC * pDC = CDC::FromHandle( (HDC) wParam );
CExtEditBase::stat_PrintClient( OnQueryWindowEnabledState(), m_bMouseOver, message, lParam, this, this, pDC );
return (!0L);
}
break;
Second, please update the source code for the following method: void CExtEditBase::stat_PrintClient(
bool bEnabled,
bool bMouseOver,
UINT message,
LPARAM lParam,
CWnd * pWnd,
CExtPmBridge * pPmBridge,
CDC * pDC
)
{
ASSERT_VALID( pWnd );
ASSERT( pWnd->GetSafeHwnd() != NULL );
ASSERT( pPmBridge != NULL );
ASSERT_VALID( pDC );
ASSERT( pDC->GetSafeHdc() != NULL );
CRect rcWnd;
pWnd->GetWindowRect( &rcWnd );
rcWnd.OffsetRect( -rcWnd.TopLeft() );
CExtMemoryDC dc( pDC, &rcWnd, CExtMemoryDC::MDCOPT_TO_MEMORY|CExtMemoryDC::MDCOPT_FILL_BITS|CExtMemoryDC::MDCOPT_RTL_COMPATIBILITY );
if( (lParam&PRF_NONCLIENT) != 0 )
CExtEditBase::stat_DoPaintNc( bEnabled, bMouseOver, pWnd, pPmBridge, pDC );
if( (lParam&PRF_CHILDREN) != 0 )
CExtPaintManager::stat_PrintChildren( pWnd->m_hWnd, message, dc.GetSafeHdc(), lParam, false );
}
Additionally, we found similar issue in the CExtComboBox control. To fix it, please update the source code for the following method: LRESULT CExtComboBox::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if( message == WM_PRINT || message == WM_PRINTCLIENT )
{
CExtComboBoxBase::WindowProc( message, wParam, lParam );
CDC * pDC = CDC::FromHandle( (HDC)wParam );
CRect rcClient;
GetClientRect( &rcClient );
CExtMemoryDC dc( pDC, &rcClient, CExtMemoryDC::MDCOPT_TO_MEMORY|CExtMemoryDC::MDCOPT_FILL_BITS|CExtMemoryDC::MDCOPT_RTL_COMPATIBILITY );
DWORD dwStyle = GetStyle();
if( (dwStyle&CBS_SIMPLE) == CBS_SIMPLE
&& (dwStyle&CBS_DROPDOWN) != CBS_DROPDOWN
&& (dwStyle&CBS_DROPDOWNLIST) != CBS_DROPDOWNLIST
)
{
if( (! PmBridge_GetPM()->GetCb2DbTransparentMode(this) )
|| (! PmBridge_GetPM()->PaintDockerBkgnd( true, dc, this ) )
)
dc.FillSolidRect( &rcClient, PmBridge_GetPM()->GetColor( CExtPaintManager::CLR_3DFACE_OUT, this ) );
}
_OnDrawComboImpl( GetDroppedState() ? true : false, IsHovered(), &dc );
if( (lParam&PRF_CHILDREN) != 0 )
CExtPaintManager::stat_PrintChildren( m_hWnd, message, dc.GetSafeHdc(), lParam, false );
return (!0);
}
return CExtComboBoxBase::WindowProc( message, wParam, lParam );
}
|
|
Arjan
|
Sep 17, 2009 - 2:24 AM
|
Thank you for reply, it works. Sorry I wasn’t able to test it right away, but I just did, and it solves the problems we’ve encountered. Also thank you for checking other controls, and fixing the ComboBox aswell.
|
|
howard liu
|
Sep 9, 2009 - 1:46 AM
|
Hi, I am getting this error when compiling a source file. What does it mean ? Thank you. 1>d:\foss software inc\prof-uis\include\extscrollwnd.h(446) : error C2661: ’CExtWFF<CExtWFFBase>::CExtWFF’ : no overloaded function takes 2 arguments
1> with
1> [
1> CExtWFFBase=CTreeCtrl
1> ]
1> d:\foss software inc\prof-uis\include\extscrollwnd.h(420) : while compiling class template member function ’CExtNCSB_Impl<_BTNCSBimpl>::CExtNCSB_Impl(UINT,CWnd *,bool,bool)’
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CTreeCtrl>
1> ]
1> d:\foss software inc\prof-uis\include\extscrollwnd.h(1178) : see reference to class template instantiation ’CExtNCSB_Impl<_BTNCSBimpl>’ being compiled
1> with
1> [
1> _BTNCSBimpl=CExtWFF<CTreeCtrl>
1> ]
1> d:\treectrl.h(7) : see reference to class template instantiation ’CExtNCSB<_BTNCSB>’ being compiled
1> with
1> [
1> _BTNCSB=CExtWFF<CTreeCtrl>
1> ]
|
|
howard liu
|
Sep 22, 2009 - 12:27 AM
|
After some changes, I got different compilation error, following are my changes I’ve made: in VNTITreeCtrl.h
|
|
Technical Support
|
Sep 18, 2009 - 2:43 PM
|
Please use the CExtWFF < CExtNCSB < CTreeCtrl > > template class as base of your tree control class. This is correct. But we think you faced an issue which was fixed after the Prof-UIS 2.85 was released. So, we would like to ask you to update the source code for the …/Prof-UIS/Include/ExtScrollWnd.h and …/Prof-UIS/Src/ExtScrollWnd.cpp files first:
http://www.prof-uis.com/download/forums/tmp/UpdatedExtScrollWnd.zip
|
|
howard liu
|
Sep 21, 2009 - 10:32 PM
|
Thanks for your suggestions, I’ve downloaded and updated the ExtScrollWnd.h and ExtScrollWnd.cpp, and rebuild the project, the same compiler error still exists. Following are the template class used in the class declaration: class GEXUTILSAPI CVNTITreeCtrl : public CExtWFF < CExtNCSB <CTreeCtrl> > {...} and the compilation error is: Error 135 error C2664: ’CExtWFF<CExtWFFBase>::CExtWFF(const CExtWFF<CExtWFFBase> &)’ : cannot convert parameter 1 from ’bool’ to ’const CExtWFF<CExtWFFBase> &’ d:\vnti\vnti10\vnti\ve_controls\vectorntiutils\vntitreectrl.cpp 52 Please help. Thank you.
|
|
Technical Support
|
Sep 23, 2009 - 5:03 AM
|
Please use the default constructor without parameters when instantiating the CExtWFF < CExtNCSB < CTreeCtrl > > -based type.
|
|
howard liu
|
Sep 18, 2009 - 12:34 AM
|
Thanks for your reply, there is one place I’m using CExtNCSB < CExtWFF < CTreeCtrl > > template type, as shown following class GEXUTILSAPI CVNTITreeCtrl : public CExtNCSB < CExtWFF<CTreeCtrl> > {...} , following your suggestion I changed the above to following class GEXUTILSAPI CVNTITreeCtrl : public CExtWFF < CExtNCSB <CTreeCtrl> > , the compiler gives following error Error 135 error C2664: ’CExtWFF<CExtWFFBase>::CExtWFF(const CExtWFF<CExtWFFBase> &)’ : cannot convert parameter 1 from ’bool’ to ’const CExtWFF<CExtWFFBase> &’ d:\vnti\vnti10\vnti\ve_controls\vectorntiutils\vntitreectrl.cpp 50
at CVNTITreeCtrl::CVNTITreeCtrl():CExtWFF < CExtNCSB <CTreeCtrl> >(true) {...}, could I get your help on what’s the cause of this problem? and how to solve it? Thanks.
|
|
Technical Support
|
Sep 10, 2009 - 4:32 AM
|
It looks like you tried to compile the CExtNCSB < CExtWFF < CTreeCtrl > > template based type and compiler cannot find appropriated constructors in the CExtWFF template class to invoke from the constructors of the CExtNCSB template class. Please use the CExtWFF < CExtNCSB < CTreeCtrl > > template based type instead.
|
|
howard liu
|
Sep 18, 2009 - 12:37 AM
|
Thanks for your reply, there is one place I’m using CExtNCSB < CExtWFF < CTreeCtrl > > template type, as shown following class GEXUTILSAPI CVNTITreeCtrl : public CExtNCSB < CExtWFF<CTreeCtrl> > {...} , following your suggestion I changed the above to following class GEXUTILSAPI CVNTITreeCtrl : public CExtWFF < CExtNCSB <CTreeCtrl> > , the compiler gives following error, Error 135 error C2664: ’CExtWFF<CExtWFFBase>::CExtWFF(const CExtWFF<CExtWFFBase> &)’ : cannot convert parameter 1 from ’bool’ to ’const CExtWFF<CExtWFFBase> &’ d:\vnti\vnti10\vnti\ve_controls\vectorntiutils\vntitreectrl.cpp 50
at CVNTITreeCtrl::CVNTITreeCtrl():CExtWFF < CExtNCSB <CTreeCtrl> >(true) {...}, could I get your help on what’s the cause of this problem? and how to solve it? Thanks.
|
|
howard liu
|
Sep 22, 2009 - 12:32 AM
|
I’ve made some changes in my code, got different compilation error, following are the changes I’ve made. In VNTITreeCtrl.h class GEXUTILSAPI CVNTITreeCtrl : public CExtNCSB < CExtWFF <CTreeCtrl> > is changed to class GEXUTILSAPI CVNTITreeCtrl : public CExtWFF < CExtNCSB <CTreeCtrl> > at class declaration, in VNTITreeCtrl.cpp CVNTITreeCtrl::CVNTITreeCtrl():CExtNCSB< CExtWFF<CTreeCtrl> >(true) is changed to CVNTITreeCtrl::CVNTITreeCtrl() at constructor implementation. The compilation error now is: error C2661: ’CTreeCtrl::CTreeCtrl’ : no overloaded function takes 2 arguments c:\program files\foss software inc\prof-uis\include\extscrollwnd.h 447 Could I know how to fix it? Thank you.
|
|
Robert Hofstetter
|
Sep 8, 2009 - 11:47 PM
|
I’d like to customize the aqua skin with our own graphics. How do I convert the XML skin with customized graphics to the binary skin file ?
|
|
Technical Support
|
Sep 10, 2009 - 4:33 AM
|
We don’t have any conversion tool for that. You can use a modified version of the Skinable sample application. The CMainFrame::OnThemeLoadSkinXml() method is invoked when you pressed the Load XML Skin button. You can add the following line to the end of this method:
VERIFY( pPM->m_Skin.SerializeFile( _T("Test.Skin"), true, false ) );
As a result, the Test.Skin binary skin file will be generated.
|
|
Kevin Murray
|
Sep 8, 2009 - 12:43 PM
|
Line 5385 there is an if statement which reads: if( sizeJR.cx >= 1 && sizeJR.cx >= 1 ) Now, of course, both sides of the and operator are exactly the same. :) I am assuming one of those should be sizeJR.cy, but I figured I’d need to report this no matter what, and see what the intent was with the check. Thanks, Kevin Murray
AGI
|
|
Technical Support
|
Sep 9, 2009 - 3:19 AM
|
Yes, you are right. The second should be .cy of course. But if you already released software with this issue, then you don’t have any reason to worry about. Although the if statement in your message is incorrect, it does not causes the formula grid to work incorrectly or crash. This incorrect if statement just leads to several redundant loops while copying cell regions on drag-n-drop border area of this region to some location with or without Ctrl key pressed.
|
|
tera tera
|
Sep 7, 2009 - 9:05 PM
|
In CExtGridWnd, I want to perform the swap of the cell.
Is there the best command?
|
|
Technical Support
|
Sep 8, 2009 - 1:19 PM
|
The following snippet code moves the row with the nRowNoToMove index into the new position before the row with the nDropBeforeRowNo index:
LONG nRowNoToMove = . . .
LONG nDropBeforeRowNo = . . .
CExtGridWnd & wndGrid = . . .
ASSERT( 0 <= nDropBeforeRowNo && nDropBeforeRowNo <= wndGrid.RowCountGet() );
ASSERT( 0 <= nRowNoToMove && nRowNoToMove < wndGrid.RowCountGet() );
if( nDropBeforeRowNo <= nRowNoToMove && nRowNoToMove <= ( nDropBeforeRowNo + 1 ) )
return . . .
CExtGridDataProvider & _DataProvider = wndGrid.OnGridQueryDataProvider();
ULONG nOffset = 0L;
_DataProvider.CacheReservedCountsGet( NULL, &nOffset );
VERIFY( _DataProvider.SwapDroppedSeries( false, nRowNoToMove + nOffset, nDropBeforeRowNo + nOffset, &wndGrid ) );
The snippet code above is exactly the same as grid row drag-n-drop handling code in the CExtGridWnd::OnGridOuterDragComplete() virtual method. The code snippet above implements drag-n-dropping for one grid row. The grid cells inside the grid control does not become destroyed and created again. The selection and focus are modified inside the _DataProvider.SwapDroppedSeries( . . . ) method invocation and the same cells become focused and selected. You just need to invoke this code snippet twice to swap two rows.
|
|
tera tera
|
Sep 7, 2009 - 4:05 AM
|
Hello. At the time of the following menus. A command message is not notified even if I click a menu.
CExtRibbonNode * _MuMakeRibbnoNodeDropDownAutoChgList(
CString csStr1, CString csStr2, CString csStr3,
UINT uiMeID, UINT uiID,
UINT uiIDLargeBmp, UINT uiIDSmallBmp,
CExtRibbonNodeGroup * pRibbonGroup,
BOOL bImage,
bool bSmall, bool bNormal, bool bLarge
)
{
//-------------------
// 端部種類
//CExtRibbonNode * pNode = new CExtRibbonNode( uiID );
CExtRibbonNode * pNode = new CExtRibbonNode( uiMeID , 0, NULL, 0, csStr1 ); // デフォルトメニューID
pNode->SetCmdID ( uiID , true );
pNode->RibbonILE_RuleRemoveLargeILV(); if ( uiIDLargeBmp != 0 ){
VERIFY( pNode->m_iconBig.m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(uiIDLargeBmp ) ) );
pNode->m_iconBig.m_bmpNormal.Make32();
pNode->m_iconBig.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
} if ( uiIDSmallBmp != 0 ){
VERIFY( pNode->m_iconSmall.m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(uiIDSmallBmp) ) );
pNode->m_iconSmall.m_bmpNormal.Make32();
pNode->m_iconSmall.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
} // キャプションコメント
{
CExtCustomizeCmdScreenTip *pCmdScreenTip;
pCmdScreenTip = new CExtCustomizeCmdScreenTip;
pCmdScreenTip->CaptionMainSet ( csStr2 );
pCmdScreenTip->TextMainSet ( csStr3 );
pNode->CmdScreenTipAttach( pCmdScreenTip );
pNode->CmdScreenTipSet ( pCmdScreenTip, true, false );
} if( !bImage ){
pNode->ModifyFlags(
//__ECTN_DISPLAY_TEXTONLY_IN_MENU|
//__ECTN_TBB_AUTOCHANGE_ID | // イメージを自動的に変更する。
__ECTN_DISPLAY_TEXT_AND_IMAGE| // テキストとイメージを表示
__ECTN_TBB_SEPARATED_DROPDOWN // セパレーター付ドロップダウンメニュー
);
}
else{
pNode->ModifyFlags(
__ECTN_DISPLAY_TEXT_AND_IMAGE| // テキストとイメージを表示
__ECTN_TBB_AUTOCHANGE_ID | // イメージを自動的に変更する。
__ECTN_TBB_SEPARATED_DROPDOWN // セパレーター付ドロップダウンメニュー
);
} // アイコンの表示制御を決める
pNode->RibbonILE_RuleRemoveEntriesByILV( bSmall, bNormal, bLarge ); if( pRibbonGroup != NULL ){
pRibbonGroup->InsertNode( NULL, pNode );
}
return pNode;
} ------------------------------------------------------------------------------------ CExtCustomizeCmdTreeNode * _MuMakeRibbnoNodeDropDownList(
CString csStr1, CString csStr2, CString csStr3,
UINT uiID ,
UINT uiIDBmp,
CExtCustomizeCmdTreeNode * pNode )
{
CExtCustomizeCmdTreeNode * pTempNode = NULL;
CExtCmdIcon cIconTmp; if ( uiIDBmp != 0 ){
VERIFY( cIconTmp.m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE( uiIDBmp ) ) );
cIconTmp.m_bmpNormal.Make32();
cIconTmp.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
} pTempNode = new CExtCustomizeCmdTreeNode(
uiID,
uiID,
NULL, 0,
csStr1,
csStr1,
csStr1, 0L, &cIconTmp ); // キャプションコメント
{
CExtCustomizeCmdScreenTip *pCmdScreenTip;
pCmdScreenTip = new CExtCustomizeCmdScreenTip;
pCmdScreenTip->CaptionMainSet ( csStr2 );
pCmdScreenTip->TextMainSet ( csStr3 );
pTempNode->CmdScreenTipAttach( pCmdScreenTip );
pTempNode->CmdScreenTipSet ( pCmdScreenTip, true, false );
}
pNode->InsertNode( NULL, pTempNode ); return pTempNode;
}
|
|
Technical Support
|
Sep 11, 2009 - 7:21 AM
|
Could you please insert your ribbon group initialization code into the RibbonBar sample application and try to reproduce this issue, then send it to us?
|
|
tera tera
|
Sep 13, 2009 - 5:56 PM
|
|
|
Technical Support
|
Sep 14, 2009 - 6:25 AM
|
Thank you for the test project. To fix the un-delivered command issue please update the source code for the following method:
UINT CExtBarButton::OnTrackPopup(
CPoint point,
bool bSelectAny,
bool bForceNoAnimation
)
{
ASSERT_VALID( this );
CExtToolControlBar * pBar = GetBar();
ASSERT_VALID( pBar );
bool bDockSiteCustomizeMode = pBar->_IsDockSiteCustomizeMode();
if( bDockSiteCustomizeMode )
return UINT(-1L);
if( IsDisabled() && (! CanBePressedInDisabledState() ) )
return UINT(-1L);
CWnd * pWnd = CtrlGet();
if( pWnd != NULL )
{
LRESULT lResult = pWnd->SendMessage( CExtToolControlBar::g_nMsgContinueTrackMenu, WPARAM( this ), bSelectAny ? 1L : 0L );
lResult;
return UINT(-1L);
}
if( ! IsAbleToTrackMenu() )
return UINT(-1L);
bool bPrevTBMT = CExtToolControlBar::g_bMenuTracking;
if( CExtToolControlBar::g_bMenuTracking && pBar->_GetIndexOf(this) == pBar->m_nBtnIdxMenuTracking )
return UINT(-1L);
if( GetSeparatedDropDown() )
m_bDropDownHT = true;
CExtToolControlBar::_CloseTrackingMenus();
if( pBar->IsFloating() )
{
pBar->ActivateTopParent();
CFrameWnd * pFrame = pBar->GetDockingFrame();
ASSERT_VALID( pFrame );
pFrame->BringWindowToTop();
}
CWnd * pWndCmdTarget = GetCmdTargetWnd();
ASSERT_VALID( pWndCmdTarget );
CExtPopupMenuWnd * pPopup = OnCreatePopupMenuWnd();
ASSERT_VALID( pPopup );
DWORD dwTrackFlags = OnGetTrackPopupFlags() | TPMX_OWNERDRAW_FIXED;
#if (!defined __EXT_MFC_NO_RIBBON_BAR)
if( pBar->IsKindOf( RUNTIME_CLASS( CExtRibbonPage ) ) )
dwTrackFlags |= TPMX_COMBINE_NONE|TPMX_RIBBON_MODE|TPMX_NO_HIDE_RARELY;
else
dwTrackFlags |= TPMX_COMBINE_DEFAULT;
#else
dwTrackFlags |= TPMX_COMBINE_DEFAULT;
#endif
if( bForceNoAnimation )
dwTrackFlags |= TPMX_FORCE_NO_ANIMATION;
if( bSelectAny )
dwTrackFlags |= TPMX_SELECT_ANY;
pPopup->TrackFlagsSet( dwTrackFlags );
#if (!defined __EXT_MFC_NO_CUSTOMIZE)
CExtCustomizeCmdTreeNode * pNode = GetCmdNode();
if( pNode != NULL )
{
ASSERT_VALID( pNode );
VERIFY( pPopup->UpdateFromCmdTree( pWndCmdTarget->GetSafeHwnd(), pNode ) );
}
else
#endif
{
HMENU hMenu = GetMenu();
ASSERT( hMenu != NULL );
ASSERT( ::IsMenu(hMenu) );
CMenu _menu;
_menu.Attach( hMenu );
VERIFY( pPopup->UpdateFromMenu( pWndCmdTarget->GetSafeHwnd(), &_menu, IsContainerOfPopupLikeMenu() ) );
_menu.Detach();
}
if( IsAppendMdiWindowsMenu() && (! pBar->_IsDockSiteCustomizeMode() ) )
pPopup->UpdateMdiWindowsMenu( pWndCmdTarget );
CExtToolControlBar::g_bMenuTracking = bPrevTBMT;
CRect rcBtn = Rect();
pBar->ClientToScreen( &rcBtn );
pBar->ClientToScreen( &point );
if( CExtToolControlBar::g_bMenuTrackingExpanded )
dwTrackFlags |= TPMX_NO_HIDE_RARELY;
pBar->_SwitchMenuTrackingIndex( pBar->_GetIndexOf( this ) );
if( GetAutoChangeID()
&& (! CExtControlBar::FindHelpMode(GetBar()) )
&& (! pBar->GetParent()->IsKindOf( RUNTIME_CLASS(CExtPopupMenuWnd) ) )
)
{
HWND hWndBar = pBar->GetSafeHwnd();
CExtToolControlBar::g_bMenuTracking = true;
UINT nResultCmdID = 0;
pPopup->m_hWndNotifyMenuClosed = pBar->GetSafeHwnd();
if( GetSeparatedDropDown() )
m_bDropDownHT = true;
g_pTrackingMenuTBB = this;
if( ! pPopup->TrackPopupMenu(
dwTrackFlags|TPMX_NO_WM_COMMAND|TPMX_DO_MESSAGE_LOOP, point.x, point.y, &rcBtn, GetBar(),
CExtToolControlBar::_CbPaintCombinedContent, &nResultCmdID, true
)
)
{
g_pTrackingMenuTBB = NULL;
if( ! ::IsWindow( hWndBar ) )
return UINT(-1L);
CExtToolControlBar::_CloseTrackingMenus();
return UINT(-1L);
}
g_pTrackingMenuTBB = NULL;
if( ! ::IsWindow( hWndBar ) )
return UINT(-1L);
if( pBar->_GetIndexOf( this ) < 0 )
return UINT(-1L);
ModifyStyle( 0, TBBS_PRESSED );
pBar->Invalidate();
if( nResultCmdID == 0 )
return UINT(-1L);
#if (!defined __EXT_MFC_NO_CUSTOMIZE)
SetCmdID( nResultCmdID, true, false );
CExtCustomizeCmdTreeNode * pNodeC = GetCmdNode( false );
if( pNodeC != NULL )
{
ASSERT_VALID( pNodeC );
CExtCmdItem * pCmdItem = g_CmdManager->CmdGetPtr( g_CmdManager->ProfileNameFromWnd( hWndBar ), nResultCmdID );
LPCTSTR strText =
( pCmdItem != NULL )
? ( pCmdItem->m_sToolbarText.IsEmpty()
? ( pCmdItem->m_sMenuText.IsEmpty() ? _T("") : pCmdItem->m_sMenuText )
: pCmdItem->m_sToolbarText
)
: _T("")
;
pNodeC->SetTextInToolbar( strText );
pNodeC->SetTextInMenu( strText );
}
CFrameWnd * pFrame = pBar->GetParentFrame();
if( pFrame != NULL )
pFrame->RecalcLayout();
else
pBar->_RecalcLayoutImpl();
#else
SetCmdID( nResultCmdID, true, true );
#endif
OnDeliverCmd();
if( ::IsWindow(hWndBar) )
pBar->_UpdateButton( pBar->_GetIndexOf(this) );
}
else
{
pPopup->m_hWndNotifyMenuClosed = pBar->GetSafeHwnd();
if( GetSeparatedDropDown() )
m_bDropDownHT = true;
g_pTrackingMenuTBB = this;
if( ! pPopup->TrackPopupMenu(
dwTrackFlags, point.x, point.y, &rcBtn, GetBar(),
CExtToolControlBar::_CbPaintCombinedContent, NULL, true
)
)
{
g_pTrackingMenuTBB = NULL;
CExtToolControlBar::_CloseTrackingMenus();
return UINT(-1L);
}
CExtToolControlBar::g_bMenuTracking = true;
pBar->_SwitchMenuTrackingIndex( pBar->_GetIndexOf( this ) );
}
return UINT(-1L);
}
|
|
tera tera
|
Sep 14, 2009 - 6:27 PM
|
Hello. Please update the source code of prof-uis-com.
|
|
Technical Support
|
Sep 16, 2009 - 3:46 AM
|
|
|
Technical Support
|
Sep 8, 2009 - 1:55 AM
|
We added the following code into the beginning of the <code>CMainFrame::OnCmdMsg()</span> method in the RibbonBar sample application:
if( nID == ID_EDIT_PASTE )
{
if( nCode == CN_COMMAND && pExtra == NULL )
::AfxMessageBox( _T("ID_EDIT_PASTE") );
else if( nCode == CN_UPDATE_COMMAND_UI )
((CCmdUI*)pExtra)->Enable();
return TRUE;
}
The Paste button inside the Home ribbon tab is exactly the same drop-down button. We tested its menu in any ribbon bar state including the most compressed and auto hidden layouts. It works OK. We saw the message box. We guess the problem is really hidden somewhere in the message routing of your application.
|
|
tera tera
|
Sep 11, 2009 - 1:52 AM
|
|
|
tera tera
|
Sep 11, 2009 - 1:54 AM
|
BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
if( nCode == CN_COMMAND && pExtra == NULL )
{
TRACE(" command --> %d \n" , nID );
}
|
|
Chun Pong Lau
|
Sep 6, 2009 - 8:03 AM
|
Dear support team, How can we open a pop-up window with your library? It has to be the type which has an icon staying in the task bar list. Thanks a lot. Best regards, Chun Pong
|
|
Chun Pong Lau
|
Sep 7, 2009 - 3:37 AM
|
Dear support team, Please assume I can do the following in a CWnd derived constructor as below: HINSTANCE hInstance = (HINSTANCE) GetModuleHandle(NULL);
CString sClass = AfxRegisterWndClass(
CS_VREDRAW | CS_HREDRAW,
::LoadCursor(NULL, IDC_ARROW),
(HBRUSH) ::GetStockObject(WHITE_BRUSH),
//::LoadIcon(NULL, IDI_APPLICATION)
::LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WHITEMSG))
);
BOOL status = CreateEx(
0, // WS_EX_APPWINDOW | WS_EX_CLIENTEDGE | WS_EX_WINDOWEDGE,
sClass,
sCaption,
WS_OVERLAPPEDWINDOW | WS_VISIBLE|WS_BORDER,
CW_USEDEFAULT, CW_USEDEFAULT,
ISM_DEFAULT_W, ISM_DEFAULT_H,
NULL, NULL, NULL);
What I would like to ask is that how to make the window layout be consistent if I used: g_PaintManager.InstallPaintManager(RUNTIME_CLASS(CExtPaintManagerOffice2007_R2_Obsidian)) Like the black caption bar, black buttons for maximize, minimize and close. Thanks in advance. Regards, Chun Pong
|
|
Technical Support
|
Sep 8, 2009 - 1:53 AM
|
You should simply create any window based on the CExtNCW template class: CExtNCW < CWnd > , CExtNCW < CFrameWnd > , CExtNCW < CExtResizableDialog > .
|
|
Courtney Smith
|
Sep 4, 2009 - 2:59 PM
|
|
|
Dave Calkins
|
Nov 30, 2009 - 11:47 AM
|
Note that we’ve just started seeing similar crashes in our app. The only thing that changed was upgrading from Prof-UIS v2.82 to v2.87. Nothing else changed in our app and we saw crashes on app exit. We added the line to set afxAmbientActCtx to FALSE and this seemed to work at first, but we’re still seeing crashes on exit with a release build of our app. When we add that line in InitInstance, the nature of the crash is a little different. It appears to then crash on string destruction. The string is a member variable of the CApp-derived object instance.
|
|
Courtney Smith
|
Sep 16, 2009 - 7:44 AM
|
thanks guys, we are looking into it.
|
|
Courtney Smith
|
Sep 4, 2009 - 3:04 PM
|
i can’t post the linke with out it messing up. sorry.
|
|
Technical Support
|
Sep 6, 2009 - 11:57 AM
|
It’s only 80% safe. The 80% is our rate of the proposed solution’s safety. The proposed solution (afxAmbientActCtx = FALSE; ) just turns off the SxS context switching and MFC 8.0 or 9.0 is working like older versions of MFC (i.e. the AFX_MAINTAIN_STATE2 internal MFC class does not invoke the SxS context switching APIs). When it’s 100% safe? It’s 100% safe if the running instance of your application consists of your source code, MFC and Prof-UIS source code only, when it does not have any modules which explicitly invoke SxS context switching APIs (i.e. AfxActivateActCtx() , AfxDeactivateActCtx() , ActivateActCtx() , DeactivateActCtx() ). In the most of cases, nobody needs to invoke these APIs because MFC does this work. It looks like the only people really may need them are Microsoft developers and these APIs may be needed by Microsoft’s libraries only. The SxS context switching APIs protect your application from future versions of software components (DLLs, COM objects) which may require future versions of other software components. If the SxS context is not switched by MFC, then you will need to perform more careful testing of your software on each release. It’s better not to turn off it. But if it’s turned off, then it’s safer to create COM objects specifying exact versions of prog-id strings and it’s safer to keep all the DLLs required by main EXE module of your software in the same folder with this EXE module. The SxS subsystem makes software development more complicated. We guess, Microsoft does not fully trust to SxS context switching mechanism because MFC/VC++ runtime DLLs now have version numbers in DLL names. So, it’s better and safer to leave it working intact inside MFC, let it do it work like it was designed. What can be reason for the error occurred in your application? The reason is not hidden in UI development. You just listed URLs to forums where enough large people are gathered for discussing any problems. The SxS context switching APIs are stack like. When new context is activated by some subsystem A (DLL, library, COM object, any kind of software component), then it must be deactivated sometime later. Some other subsystem B can activate/deactivate its own SxS context between activation/deactivation of SxS context of subsystem A. Please imaging A is your software and it invoked some APIs of B. But B didn’t deactivated its SxS context. So, when A tries to deactivate context, then SEH exception is thrown from the DeactivateActCtx() function because the top context inside inner SxS stack is context of B and A tries to deactivate what cannot be deactivated before deactivation of B. The context activation/deactivation is performed inside constructor/destructor of the AFX_MAINTAIN_STATE2 MFC’s internal class. If it didn’t deactivated SxS context, then it’s constructor is not invoked during the normal C++ unwinding mechanism for in-stack objects (local function/method objects). The constructor is not invoked if some critical error is occurred: the SEH exception for instance (access violation, stack overflow, divide by zero, etc.). This is the main potential source of the problem. Of course, it’s possible some software used in your program invokes SxS APIs explicitly and due to some bug does not invoke context deactivation. But this is less possible reason for the discussed run-time error. How to find the real source of the error? You should exclude parts of your software from run-time and find situations when error does not occur. Do not invoke particular APIs. Comment parts of your application. Set up your Visual Studio to break into debugger when any SEH exceptions occur even if they are handled. Finally find the maximally functional version of your application which does not have this problem and start the next step of searching: comment/exclude smaller parts of your application and so on. We never come across this problem yet. Nobody reported it yet in our forums. So, that would be interesting to connect to your desktop and try to help you.
|
|
Courtney Smith
|
Sep 4, 2009 - 3:02 PM
|
|
|
Eric Houvenaghel
|
Sep 3, 2009 - 2:09 PM
|
I am Using CExtReportGridWnd. I would like to recieve a notification after the user has dropped a column in the group area and the grid has finished updating. I need to perform some calculations once the new grouping structure is established. Is there a away to intersept such an event?
|
|
Technical Support
|
Sep 4, 2009 - 2:28 PM
|
|
|
Timo Stripf
|
Sep 1, 2009 - 11:39 AM
|
How i can change the char length in a combobox, which is located in a toolbar? Prof-UIS Studio have the same Problem, only the avaible space is used to write text into. Text which is longer than the Combobox himself is not possible. LimitText for the Combobox, InnerEditControl are not working. Any solutions for this problem, without complete rewrite?
|
|
Technical Support
|
Sep 2, 2009 - 1:00 PM
|
You should create your combo box window with an enough large width to fit any selected string in it. So, you should measure all the strings or, at least, the maximum lengthy string. First of all, you need to use appropriate font:
CFont * pFont = CFont::FromHandle( (HFONT)::GetStockObject( DEFAULT_GUI_FONT ) );
The following code measures string size in pixels: CExtString str = _T("some string in combo box");
CWindowDC dcDesktop( NULL );
CSize sizeOfStr = CExtPaintManager::stat_CalcTextDimension( dcDesktop, *pFont, str, DT_SINGLELINE|DT_LEFT|DT_NOPREFIX ).Size();
INT nWidthOfStr = sizeOfStr.cx;
But combo box also have drop-down button and borders. So, the combo box width can be computed as: INT nWidthOfComboBox = nWidthOfStr + 6 + ::GetSystemMetrics( SM_CXVSCROLL );
|
|
Timo Stripf
|
Sep 2, 2009 - 2:55 PM
|
Sorry, but this is not the answer, which i have hoped to get. I need the Combobox like all other tools have it (for example firefox or the default combobox control [MFC]: http://clip2net.com/clip/m7085/1251923850-clip-2kb.png). When i write text into the combobox edit control, than i want that the text not stopped on the end of the control space. Why is this not supported by the CExtComboBox control in a Toolbar?
|
|
Technical Support
|
Sep 3, 2009 - 10:17 AM
|
The ProfStudio sample application has five combo boxes and one editor control created as children of different toolbar windows inside the main frame window. All these windows have non-scrollable editing behavior and you cannot enter text wider then editor. Here are the properties of the CMainFrame class representing five combo boxes and one editor:
CExtComboBox
m_wndComboSolutionCfg,
m_wndComboDlProgram,
m_wndComboDlThread,
m_wndComboDlStackFrame,
m_wndComboWebLoaction;
;
CExtEdit m_wndEditFindText;
Even if you make them CComboBox and CEdit type, then they will behave exactly the same. Why? We simply created combo boxes without the CBS_AUTOHSCROLL style and editor without the ES_AUTOHSCROLL style. We added these styles into creation code for all these combo boxes and editor and all they become editable with scrolling. Please update the source code for the CMainFrame::OnCreate() method in the ProfStudio sample application: int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
// turn off menu expanding
CExtPopupMenuWnd::g_bMenuExpanding = false;
CExtPopupMenuWnd::g_bMenuHighlightRarely = false;
if( CExtNCW < CMDIFrameWnd > :: OnCreate( lpCreateStruct ) == -1 )
return -1;
CProfStudioSplashWnd _splash( this, IDB_BITMAP_SPLASH );
_splash.SetStatusText(
_T("Initializing the Command Manager ...")
);
CWinApp * pApp = ::AfxGetApp();
ASSERT( pApp != NULL );
ASSERT( pApp->m_pszRegistryKey != NULL );
ASSERT( pApp->m_pszRegistryKey[0] != _T(’\0’) );
ASSERT( pApp->m_pszProfileName != NULL );
ASSERT( pApp->m_pszProfileName[0] != _T(’\0’) );
ASSERT( pApp->m_pszProfileName != NULL );
g_CmdManager->ProfileSetup(
pApp->m_pszProfileName,
GetSafeHwnd()
);
VERIFY(
g_CmdManager->UpdateFromMenu(
pApp->m_pszProfileName,
IDR_MAINFRAME
)
);
VERIFY(
g_CmdManager->UpdateFromMenu(
pApp->m_pszProfileName,
IDR_PROFSTUDIOTYPE
)
);
VERIFY(
g_CmdManager->UpdateFromMenu(
pApp->m_pszProfileName,
IDR_MENU_HELPER_ITEM_TEXTS
)
);
VERIFY(
g_CmdManager->UpdateFromMenu(
pApp->m_pszProfileName,
IDR_MENU_CW_SORT
)
);
VERIFY(
g_CmdManager->UpdateFromToolBar(
pApp->m_pszProfileName,
IDR_TOOLBAR_HELPER_ICONS
)
);
VERIFY(
g_CmdManager->UpdateFromMenu(
pApp->m_pszProfileName,
IDR_MENU_PENDING_CHECKINGS_OPTIONS
)
);
VERIFY(
g_CmdManager->UpdateFromToolBar(
pApp->m_pszProfileName,
IDR_TOOLBAR_HELPER_ICONS_2
)
);
static struct
{
UINT m_nCmdID;
LPCTSTR m_sToolbarText;
} arrToolbarCmdTexts[] =
{
{ ID_PENDING_CHECKINGS_CHECK_IN, _T("&Check In") },
{ ID_PENDING_CHECKINGS_COMMENTS, _T("Co&mments") },
{ ID_BPDLG_NEW, _T("New") },
{ ID_BPDLG_COLUMNS, _T("Columns") },
};
INT i;
for( i = 0; i<sizeof(arrToolbarCmdTexts)/(sizeof(arrToolbarCmdTexts[0])); i++ )
{
CExtCmdItem * pCmdItem =
g_CmdManager->CmdGetPtr(
pApp->m_pszProfileName,
arrToolbarCmdTexts[i].m_nCmdID
);
ASSERT( pCmdItem != NULL );
pCmdItem->m_sToolbarText =
arrToolbarCmdTexts[i].m_sToolbarText;
}
static struct
{
UINT m_nCmdID;
} arrCmdsToRegister[] =
{
{ ID_OBJECT_BROWSER_BROWSE_COMBOBOX },
{ ID_OBJECT_BROWSER_CUSTOMIZE },
};
for( i=0; i<sizeof(arrCmdsToRegister)/(sizeof(arrCmdsToRegister[0])); i++ )
{
ASSERT(
!g_CmdManager->CmdIsRegistered(
pApp->m_pszProfileName,
arrCmdsToRegister[i].m_nCmdID
)
);
CExtCmdItem * pCmdItem =
g_CmdManager->CmdAllocPtr(
pApp->m_pszProfileName,
arrCmdsToRegister[i].m_nCmdID
);
ASSERT( pCmdItem != NULL );
ASSERT( pCmdItem->m_nCmdID == arrCmdsToRegister[i].m_nCmdID );
pCmdItem;
}
_splash.SetStatusText(
_T("Creating toolbars ...")
);
m_wndMenuBar.SetMdiWindowPopupName( _T("Window") );
if( !m_wndMenuBar.Create(
NULL, // _T("Menu Bar"),
this,
ID_VIEW_MENUBAR,
WS_CHILD|WS_VISIBLE
|CBRS_TOP //|CBRS_GRIPPER
|CBRS_TOOLTIPS
|CBRS_FLYBY|CBRS_SIZE_DYNAMIC
|CBRS_HIDE_INPLACE
)
)
{
TRACE0("Failed to create menubar\n");
return -1; // failed to create
}
if( !m_wndToolBarStandard.Create(
_T("Standard"),
this,
AFX_IDW_TOOLBAR
)
||
!m_wndToolBarStandard.LoadToolBar(IDR_MAINFRAME)
)
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
if( !m_wndComboSolutionCfg.Create(
WS_CHILD|WS_VISIBLE|CBS_HASSTRINGS|CBS_DROPDOWN|CBS_AUTOHSCROLL,
CRect(0,0,100,200),
&m_wndToolBarStandard,
ID_SOLUTION_CONFIGURATION_COMBO
)
)
{
TRACE0("Failed to create m_wndComboSolutionCfg\n");
return -1; // fail to create
}
VERIFY(
m_wndToolBarStandard.SetButtonCtrl(
m_wndToolBarStandard.CommandToIndex(ID_SOLUTION_CONFIGURATION_COMBO),
&m_wndComboSolutionCfg
)
);
m_wndComboSolutionCfg.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndComboSolutionCfg.SetItemHeight(
-1,
m_wndComboSolutionCfg.GetItemHeight(-1) - 1
);
m_wndComboSolutionCfg.AddString( _T("Win32 Debug") );
m_wndComboSolutionCfg.AddString( _T("Win32 Release") );
m_wndComboSolutionCfg.AddString( _T("Win32 Unicode Debug") );
m_wndComboSolutionCfg.AddString( _T("Win32 Unicode Release") );
m_wndComboSolutionCfg.SetCurSel( 0 );
if( !m_wndEditFindText.Create(
WS_CHILD|WS_VISIBLE|ES_LEFT|ES_AUTOHSCROLL,
CRect(0,0,180,17),
&m_wndToolBarStandard,
ID_EDIT_FIND
)
)
{
TRACE0("Failed to create ID_EDIT_FIND\n");
return -1; // fail to create
}
VERIFY(
m_wndToolBarStandard.SetButtonCtrl(
m_wndToolBarStandard.CommandToIndex(ID_EDIT_FIND),
&m_wndEditFindText
)
);
m_wndToolBarStandard.GetButton(
m_wndToolBarStandard.CommandToIndex(ID_EDIT_FIND)
) -> SetCtrlVisibleVertically( TRUE );
m_wndEditFindText.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
if( (! m_wndToolBarUiLook.Create( NULL, this, ID_VIEW_UI_LOOK_BAR ) )
|| (! m_wndToolBarUiLook.ThemeSwitcherInit() )
)
{
TRACE0("Failed to create m_wndToolBarUiLook\n");
return -1; // fail to create
}
static const UINT arrDebugTbBtns[] =
{
ID_DEBUG_START,
ID_DEBUG_BREAK_ALL,
ID_DEBUG_STOP_DEBUGGING,
ID_DEBUG_RESTART,
ID_SEPARATOR,
ID_DEBUG_SHOW_NEXT_STATMENT,
ID_DEBUG_STEP_INTO,
ID_DEBUG_STEP_OVER,
ID_DEBUG_STEP_OUT,
};
if( !m_wndToolBarDebug.Create(
_T("Debug"),
this,
ID_VIEW_TOOLBAR_DEBUG
)
|| !m_wndToolBarDebug.SetButtons( arrDebugTbBtns, sizeof(arrDebugTbBtns)/sizeof(arrDebugTbBtns[0]) )
|| !m_wndToolBarDebug.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarDebug\n");
return -1; // fail to create
}
static const UINT arrBuildTbBtns[] =
{
ID_BUILD_SELECTION,
ID_BUILD_SOLUTION,
ID_SEPARATOR,
ID_BUILD_CANCEL,
};
if( !m_wndToolBarBuild.Create(
_T("Build"),
this,
ID_VIEW_TOOLBAR_BUILD
)
|| !m_wndToolBarBuild.SetButtons( arrBuildTbBtns, sizeof(arrBuildTbBtns)/sizeof(arrBuildTbBtns[0]) )
|| !m_wndToolBarBuild.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarBuild\n");
return -1; // fail to create
}
static const UINT arrTextEditorTbBtns[] =
{
ID_TE_PARAMETER_INFO,
ID_TE_QUICK_INFO,
ID_TE_COMPLETE_WORD,
ID_SEPARATOR,
ID_EDIT_ADVANCED_LINE_INDENT,
ID_EDIT_ADVANCED_LINE_UNINDENT,
ID_SEPARATOR,
ID_TE_SELECTION_COMMENT,
ID_TE_SELECTION_UNCOMMENT,
ID_EDIT_BOOKMARK_TOGGLE,
ID_EDIT_BOOKMARK_NEXT,
ID_EDIT_BOOKMARK_PREVIOUSE,
ID_EDIT_BOOKMARK_CLEAR,
};
if( !m_wndToolBarTextEditor.Create(
_T("Text Editor"),
this,
ID_VIEW_TOOLBAR_TE
)
|| !m_wndToolBarTextEditor.SetButtons( arrTextEditorTbBtns, sizeof(arrTextEditorTbBtns)/sizeof(arrTextEditorTbBtns[0]) )
|| !m_wndToolBarTextEditor.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarTextEditor\n");
return -1; // fail to create
}
static const UINT arrSourceControlTbBtns[] =
{
ID_SOURCE_CONTROL_CHANGE,
ID_SEPARATOR,
ID_SOURCE_CONTROL_GET_LATEST_VERSION,
ID_SOURCE_CONTROL_GET,
ID_SOURCE_CONTROL_CHECK_OUT,
ID_SOURCE_CONTROL_CHECK_IN,
ID_SOURCE_CONTROL_UNDO_CHECK_OUT,
ID_SOURCE_CONTROL_HISTORY,
ID_SEPARATOR,
ID_SOURCE_CONTROL_SHARE,
ID_SOURCE_CONTROL_COMPARE_VERSIONS,
ID_SOURCE_CONTROL_PROPERTIES,
ID_SEPARATOR,
ID_SOURCE_CONTROL_MANAGER,
ID_SOURCE_CONTROL_REFRESH_STATUS
};
if( !m_wndToolBarSourceControl.Create(
_T("Source Control"),
this,
ID_VIEW_TOOLBAR_SOURCE_CONTROL
)
|| !m_wndToolBarSourceControl.SetButtons( arrSourceControlTbBtns, sizeof(arrSourceControlTbBtns)/sizeof(arrSourceControlTbBtns[0]) )
|| !m_wndToolBarSourceControl.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarSourceControl\n");
return -1; // fail to create
}
static const UINT arrDataDesignTbBtns[] =
{
ID_DS_GENERATE_DATA_SET,
ID_DS_PREVIEW_DATA,
};
if( !m_wndToolBarDataDesign.Create(
_T("Data Design"),
this,
ID_VIEW_TOOLBAR_DATA_DESIGN
)
|| !m_wndToolBarDataDesign.SetButtons( arrDataDesignTbBtns, sizeof(arrDataDesignTbBtns)/sizeof(arrDataDesignTbBtns[0]) )
|| !m_wndToolBarDataDesign.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarDataDesign\n");
return -1; // fail to create
}
static const UINT arrDebugLocationTbBtns[] =
{
ID_DL_PROGRAM,
ID_DL_THREAD,
ID_DL_STACK_FRAME,
};
if( !m_wndToolBarDebugLocation.Create(
_T("Debug Location"),
this,
ID_VIEW_TOOLBAR_DEBUG_LOCATION
)
|| !m_wndToolBarDebugLocation.SetButtons( arrDebugLocationTbBtns, sizeof(arrDebugLocationTbBtns)/sizeof(arrDebugLocationTbBtns[0]) )
|| !m_wndToolBarDebugLocation.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarDebugLocation\n");
return -1; // fail to create
}
if( !m_wndComboDlProgram.Create(
WS_CHILD|WS_VISIBLE|CBS_HASSTRINGS|CBS_DROPDOWN|CBS_AUTOHSCROLL,
CRect(0,0,150,200),
&m_wndToolBarDebugLocation,
ID_DL_PROGRAM
)
)
{
TRACE0("Failed to create ID_DL_PROGRAM\n");
return -1; // fail to create
}
VERIFY(
m_wndToolBarDebugLocation.SetButtonCtrl(
m_wndToolBarDebugLocation.CommandToIndex(ID_DL_PROGRAM),
&m_wndComboDlProgram
)
);
m_wndComboDlProgram.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndComboDlProgram.SetItemHeight(
-1,
m_wndComboDlProgram.GetItemHeight(-1) - 1
);
if( !m_wndComboDlThread.Create(
WS_CHILD|WS_VISIBLE|CBS_HASSTRINGS|CBS_DROPDOWN|CBS_AUTOHSCROLL,
CRect(0,0,120,200),
&m_wndToolBarDebugLocation,
ID_DL_THREAD
)
)
{
TRACE0("Failed to create ID_DL_THREAD\n");
return -1; // fail to create
}
VERIFY(
m_wndToolBarDebugLocation.SetButtonCtrl(
m_wndToolBarDebugLocation.CommandToIndex(ID_DL_THREAD),
&m_wndComboDlThread
)
);
m_wndComboDlThread.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndComboDlThread.SetItemHeight(
-1,
m_wndComboDlThread.GetItemHeight(-1) - 1
);
if( !m_wndComboDlStackFrame.Create(
WS_CHILD|WS_VISIBLE|CBS_HASSTRINGS|CBS_DROPDOWN|CBS_AUTOHSCROLL,
CRect(0,0,200,200),
&m_wndToolBarDebugLocation,
ID_DL_STACK_FRAME
)
)
{
TRACE0("Failed to create ID_DL_STACK_FRAME\n");
return -1; // fail to create
}
VERIFY(
m_wndToolBarDebugLocation.SetButtonCtrl(
m_wndToolBarDebugLocation.CommandToIndex(ID_DL_STACK_FRAME),
&m_wndComboDlStackFrame
)
);
m_wndComboDlStackFrame.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndComboDlStackFrame.SetItemHeight(
-1,
m_wndComboDlStackFrame.GetItemHeight(-1) - 1
);
static const UINT arrXmlDataTbBtns[] =
{
ID_XML_CREATE_SCHEMA,
};
if( !m_wndToolBarXmlData.Create(
_T("XML Data"),
this,
ID_VIEW_TOOLBAR_XML_DATA
)
|| !m_wndToolBarXmlData.SetButtons( arrXmlDataTbBtns, sizeof(arrXmlDataTbBtns)/sizeof(arrXmlDataTbBtns[0]) )
|| !m_wndToolBarXmlData.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarXmlData\n");
return -1; // fail to create
}
static const UINT arrXmlSchemaTbBtns[] =
{
ID_XML_EDIT_KEY,
ID_XML_EDIT_RELATION,
ID_XML_MAKE_TYPE_GLOBAL,
ID_XML_PREVIEW_DATA_SET,
};
if( !m_wndToolBarXmlSchema.Create(
_T("XML Schema"),
this,
ID_VIEW_TOOLBAR_XML_SCHEMA
)
|| !m_wndToolBarXmlSchema.SetButtons( arrXmlSchemaTbBtns, sizeof(arrXmlSchemaTbBtns)/sizeof(arrXmlSchemaTbBtns[0]) )
|| !m_wndToolBarXmlSchema.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarXmlSchema\n");
return -1; // fail to create
}
static const UINT arrQueryTbBtns[] =
{
ID_QUERY_SHOW_PANES_DIAGRAM,
ID_QUERY_SHOW_PANES_GRID,
ID_QUERY_SHOW_PANES_SQL,
ID_QUERY_SHOW_PANES_RESULTS,
ID_SEPARATOR,
ID_QUERY_RUN,
ID_QUERY_VERIFY_SYNTAX,
ID_SEPARATOR,
ID_QUERY_SORT_ASCENDING,
ID_QUERY_SORT_DESCENDING,
ID_QUERY_REMOVE_FILTER,
ID_SEPARATOR,
ID_QUERY_GROUP_BY,
ID_SEPARATOR,
ID_QUERY_ADD_TABLE_VIEW
};
if( !m_wndToolBarQuery.Create(
_T("Query"),
this,
ID_VIEW_TOOLBAR_QUERY
)
|| !m_wndToolBarQuery.SetButtons( arrQueryTbBtns, sizeof(arrQueryTbBtns)/sizeof(arrQueryTbBtns[0]) )
|| !m_wndToolBarQuery.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarQuery\n");
return -1; // fail to create
}
static const UINT arrWebTbBtns[] =
{
ID_WEB_BACKWARD,
ID_WEB_NAVIGATE_FORWARD,
ID_WEB_STOP_BROWSER,
ID_WEB_REFRESH_BROWSER,
ID_WEB_HOME,
ID_SEPARATOR,
ID_WEB_SEARCH,
ID_WEB_FAVORITES,
ID_WEB_ADD_TO_FAVORITES,
ID_SEPARATOR,
ID_WEB_URL,
ID_SEPARATOR,
ID_WEB_SYNC_CONTEMTS,
ID_WEB_PREVIOUSE_TOPIC,
ID_WEB_NEXT_TOPIC,
ID_SEPARATOR,
ID_WEB_TEXT_SIZE,
};
if( !m_wndToolBarWeb.Create(
_T("Web"),
this,
ID_VIEW_TOOLBAR_WEB
)
|| !m_wndToolBarWeb.SetButtons( arrWebTbBtns, sizeof(arrWebTbBtns)/sizeof(arrWebTbBtns[0]) )
|| !m_wndToolBarWeb.InitContentExpandButton()
)
{
TRACE0("Failed to create m_wndToolBarWeb\n");
return -1; // fail to create
}
if( !m_wndComboWebLoaction.Create(
WS_CHILD|WS_VISIBLE|CBS_HASSTRINGS|CBS_DROPDOWN|CBS_AUTOHSCROLL,
CRect(0,0,300,200),
&m_wndToolBarWeb,
ID_WEB_URL
)
)
{
TRACE0("Failed to create ID_WEB_URL\n");
return -1; // fail to create
}
VERIFY(
m_wndToolBarWeb.SetButtonCtrl(
m_wndToolBarWeb.CommandToIndex(ID_WEB_URL),
&m_wndComboWebLoaction
)
);
m_wndComboWebLoaction.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndComboWebLoaction.SetItemHeight(
-1,
m_wndComboWebLoaction.GetItemHeight(-1) - 1
);
CExtCmdProfile * pProfile =
g_CmdManager->ProfileGetPtr( pApp->m_pszProfileName );
ASSERT( pProfile != NULL );
POSITION posCmd = pProfile->m_cmds.GetStartPosition();
for( ; posCmd != NULL; )
{
UINT nID;
CExtCmdItem * pCmdItem = NULL;
pProfile->m_cmds.GetNextAssoc( posCmd, nID, pCmdItem );
ASSERT( pCmdItem != NULL );
if( pCmdItem->m_sTipTool.IsEmpty()
|| pCmdItem->m_sTipStatus.IsEmpty()
)
{
CString sTip;
if( !pCmdItem->m_sMenuText.IsEmpty() )
sTip = (LPCTSTR)pCmdItem->m_sMenuText;
else if( !pCmdItem->m_sToolbarText.IsEmpty() )
sTip = (LPCTSTR)pCmdItem->m_sToolbarText;
if( !sTip.IsEmpty() )
{
if( pCmdItem->m_sTipTool.IsEmpty() )
pCmdItem->m_sTipTool = sTip;
if( pCmdItem->m_sTipStatus.IsEmpty() )
pCmdItem->m_sTipStatus = sTip;
}
}
}
_splash.SetStatusText(
_T("Creating dockable panels ...")
);
if( !m_wndSolutionExplorerBar.Create(
_T("Solution Explorer"),
this,
ID_VIEW_BAR_SE
)
|| !m_wndSolutionExplorerChild.Create(
CProfStudioSolutionExplorer::IDD,
&m_wndSolutionExplorerBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_SE\n");
return -1; // fail to create
}
if( !m_wndResourceViewBar.Create(
_T("Resource View"),
this,
ID_VIEW_BAR_RESOURCE_VIEW
)
|| !m_wndResourceViewChild.Create(
WS_CHILD|WS_VISIBLE
|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS
|TVS_INFOTIP|TVS_SHOWSELALWAYS
,
CRect(0,0,0,0),
&m_wndResourceViewBar,
ID_VIEW_BAR_RESOURCE_VIEW
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_RESOURCE_VIEW\n");
return -1; // fail to create
}
CProfStudioThinFrame * pWndThinFrame = new CProfStudioThinFrame;
if( !pWndThinFrame->CreateDynamicThinFrame(&m_wndResourceViewChild) )
{
TRACE0("Failed to create thin frame for ID_VIEW_BAR_RESOURCE_VIEW\n");
return -1; // fail to create
}
m_wndResourceViewChild.InitResourceViewTree();
if( !m_wndClassViewBar.Create(
_T("Class View"),
this,
ID_VIEW_BAR_CLASS_VIEW
)
|| !m_wndClassViewChild.Create(
CProfStudioClassView::IDD,
&m_wndClassViewBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_CLASS_VIEW\n");
return -1; // fail to create
}
if( !m_wndServerExplorerBar.Create(
_T("Server Explorer"),
this,
ID_VIEW_BAR_SRV_EXPLORER
)
|| !m_wndServerExplorerChild.Create(
CProfStudioServerExplorer::IDD,
&m_wndServerExplorerBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_SRV_EXPLORER\n");
return -1; // fail to create
}
if( (! m_wndPropertiesBar.Create(
_T("Properties"),
this,
ID_VIEW_BAR_PROPERTIES
) )
#if (defined __EXT_MFC_NO_PROPERTYGRIDWND)
|| (! m_wndPropertiesChild.Create(
CProfStudioProperties::IDD,
&m_wndPropertiesBar
) )
#else // (defined __EXT_MFC_NO_PROPERTYGRIDWND)
|| (! m_wndPGC.Create(
&m_wndPropertiesBar
) )
#endif // else from (defined __EXT_MFC_NO_PROPERTYGRIDWND)
)
{
TRACE0("Failed to create ID_VIEW_BAR_PROPERTIES\n");
return -1; // fail to create
}
if( !m_wndToolboxBar.Create(
_T("Toolbox"),
this,
ID_VIEW_BAR_TOOLBOX
)
|| !m_wndToolboxChild.Create(
&m_wndToolboxBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_TOOLBOX\n");
return -1; // fail to create
}
if( !m_wndPendingCheckingsBar.Create(
_T("Pending Checkings"),
this,
ID_VIEW_BAR_PENDING_CHECKINGS
)
|| !m_wndPendingCheckingsChild.Create(
CProfStudioPendingCheckingsView::IDD,
&m_wndPendingCheckingsBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_PENDING_CHECKINGS\n");
return -1; // fail to create
}
if( !m_wndWebBrowserBar.Create(
_T("Web Browser"),
this,
ID_VIEW_BAR_WEB_BROWSER
)
|| !m_wndWebBrowserChild.Create(
&m_wndWebBrowserBar
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndWebBrowserChild
)
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_WEB_BROWSER\n");
return -1; // fail to create
}
m_wndWebBrowserChild.NavigateResourceID(
ID_WEB_BROWSER_PAGE
);
if( !m_wndMacroExplorerBar.Create(
_T("Macro Explorer"),
this,
ID_VIEW_BAR_MACRO_EXPLORER
)
|| !m_wndMacroExplorerChild.Create(
WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL
|TVS_HASLINES|TVS_HASBUTTONS|TVS_INFOTIP
,
CRect( 0,0,0,0 ),
&m_wndMacroExplorerBar,
UINT(IDC_STATIC)
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndMacroExplorerChild
)
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_MACRO_EXPLORER\n");
return -1; // fail to create
}
m_wndMacroExplorerChild.InitMacroExplorerTree();
if( !m_wndObjectBrowserBar.Create(
_T("Object Browser"),
this,
ID_VIEW_BAR_OBJECT_BROWSER
)
|| !m_wndObjectBrowserChild.Create(
CProfStudioObjectBrowserView::IDD,
&m_wndObjectBrowserBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_OBJECT_BROWSER\n");
return -1; // fail to create
}
if( !m_wndDocumentOutlineBar.Create(
_T("Document Outline"),
this,
ID_VIEW_BAR_DOCUMENT_OUTLINE
)
|| !m_wndDocumentOutlineChild.Create(
CProfStudioNoItemsToShowWnd::IDD,
&m_wndDocumentOutlineBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_DOCUMENT_OUTLINE\n");
return -1; // fail to create
}
if( !m_wndTaskListBar.Create(
_T("Task List"),
this,
ID_VIEW_BAR_TASK_LIST
)
|| !m_wndTaskListChild.Create(
&m_wndTaskListBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_TASK_LIST\n");
return -1; // fail to create
}
if( !m_wndCommandWindowBar.Create(
_T("Command Window"),
this,
ID_VIEW_BAR_COMMAND_WINDOW
)
|| !m_wndCommandWindowChild.Create(
WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL
|ES_MULTILINE|ES_LEFT|ES_NOHIDESEL|ES_WANTRETURN
|ES_AUTOHSCROLL|ES_AUTOVSCROLL
,
CRect( 0,0,0,0 ),
&m_wndCommandWindowBar,
UINT(IDC_STATIC)
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndCommandWindowChild
)
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_COMMAND_WINDOW\n");
return -1; // fail to create
}
m_wndCommandWindowChild.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndCommandWindowChild.SetWindowText(
_T(">\r\n")
_T(">\r\n")
_T(">")
);
m_wndCommandWindowChild.SetSel( -1, -1 );
if( !m_wndOutputBar.Create(
_T("Output"),
this,
ID_VIEW_BAR_OUTPUT
)
|| !m_wndOutputChild.Create(
CProfStudioOutputView::IDD,
&m_wndOutputBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_OUTPUT\n");
return -1; // fail to create
}
if( !m_wndFindResults1Bar.Create(
_T("Find Results 1"),
this,
ID_VIEW_BAR_FIND_RESULTS_1
)
|| !m_wndFindResults1Child.Create(
WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL
|ES_MULTILINE|ES_LEFT|ES_NOHIDESEL|ES_WANTRETURN
|ES_AUTOHSCROLL|ES_AUTOVSCROLL
,
CRect( 0,0,0,0 ),
&m_wndFindResults1Bar,
UINT(IDC_STATIC)
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndFindResults1Child
)
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_FIND_RESULTS_1\n");
return -1; // fail to create
}
m_wndFindResults1Child.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndFindResults1Child.SetWindowText(
_T("Find all \"BEGIN_MESSAGE_MAP\", Subfolders, Find Results 1, Current Project: testdlg.vcproj, \"*.*\"\r\n")
_T("C:\\MyFolder\\MyDlg.cpp(40):BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)\r\n")
_T("C:\\MyFolder\\MyDlg.cpp(59):BEGIN_MESSAGE_MAP(CMyDlg, CDialog)\r\n")
_T("C:\\MyFolder\\testdlg.cpp(15):BEGIN_MESSAGE_MAP(CMyApp, CWinApp)\r\n")
_T("Total found: 3 Matching files: 2 Total files searched: 10\r\n")
);
m_wndFindResults1Child.SetSel( -1, -1 );
if( !m_wndFindResults2Bar.Create(
_T("Find Results 2"),
this,
ID_VIEW_BAR_FIND_RESULTS_2
)
|| !m_wndFindResults2Child.Create(
WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL
|ES_MULTILINE|ES_LEFT|ES_NOHIDESEL|ES_WANTRETURN
|ES_AUTOHSCROLL|ES_AUTOVSCROLL
,
CRect( 0,0,0,0 ),
&m_wndFindResults2Bar,
UINT(IDC_STATIC)
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndFindResults2Child
)
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_FIND_RESULTS_2\n");
return -1; // fail to create
}
m_wndFindResults2Child.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndFindResults2Child.SetWindowText(
_T("Find all \"CString\", Subfolders, Find Results 1, Current Project: testdlg.vcproj, \"*.*\"\r\n")
_T("C:\\MyFolder\\MyDlg.cpp(82): CString strAboutMenu;\r\n")
_T("C:\\MyFolder\\stdafx.h(29):#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit\r\n")
_T("Total found: 2 Matching files: 2 Total files searched: 10\r\n")
);
m_wndFindResults2Child.SetSel( -1, -1 );
if( !m_wndFindSymbolResultsBar.Create(
_T("Find Symbol Results"),
this,
ID_VIEW_BAR_FIND_SYMBOL_RESULTS
)
|| !m_wndFindSymbolResultsChild.Create(
WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL
|TVS_HASBUTTONS|TVS_INFOTIP
,
CRect( 0,0,0,0 ),
&m_wndFindSymbolResultsBar,
UINT(IDC_STATIC)
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndFindSymbolResultsChild
)
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_FIND_SYMBOL_RESULTS\n");
return -1; // fail to create
}
m_wndFindSymbolResultsChild.InitFindSymbolResultsTree();
if( !m_wndFavoritesBar.Create(
_T("Favorites"),
this,
ID_VIEW_BAR_FAVORITES
)
|| !m_wndFavoritesChild.Create(
CProfStudioFavoritesView::IDD,
&m_wndFavoritesBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_FAVORITES\n");
return -1; // fail to create
}
if( !m_wndDynamicHelpBar.Create(
_T("Dynamic Help"),
this,
ID_VIEW_BAR_DYNAMIC_HELP
)
|| !m_wndDynamicHelpChild.Create(
&m_wndDynamicHelpBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_DYNAMIC_HELP\n");
return -1; // fail to create
}
if( !m_wndHelpContentsBar.Create(
_T("Contents"),
this,
ID_VIEW_BAR_HELP_CONTENTS
)
|| !m_wndHelpContentsChild.Create(
CProfStudioHelpContentsView::IDD,
&m_wndHelpContentsBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_HELP_CONTENTS\n");
return -1; // fail to create
}
if( !m_wndHelpIndexBar.Create(
_T("Index"),
this,
ID_VIEW_BAR_HELP_INDEX
)
|| !m_wndHelpIndexChild.Create(
CProfStudioHelpIndexView::IDD,
&m_wndHelpIndexBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_HELP_INDEX\n");
return -1; // fail to create
}
if( !m_wndHelpSearchBar.Create(
_T("Search"),
this,
ID_VIEW_BAR_HELP_SEARCH
)
|| !m_wndHelpSearchChild.Create(
CProfStudioHelpSearchView::IDD,
&m_wndHelpSearchBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_HELP_SEARCH\n");
return -1; // fail to create
}
if( !m_wndHelpResultsIndexBar.Create(
_T("Index Results"),
this,
ID_VIEW_BAR_HELP_RESULTS_INDEX
)
|| !m_wndHelpResultsIndexChild.Create(
&m_wndHelpResultsIndexBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_HELP_RESULTS_INDEX\n");
return -1; // fail to create
}
m_wndHelpResultsIndexChild.InitHelpIndexResults();
if( !m_wndHelpResultsSearchBar.Create(
_T("Search Results"),
this,
ID_VIEW_BAR_HELP_RESULTS_SEARCH
)
|| !m_wndHelpResultsSearchChild.Create(
&m_wndHelpResultsSearchBar
)
)
{
TRACE0("Failed to create ID_VIEW_BAR_HELP_RESULTS_SEARCH\n");
return -1; // fail to create
}
m_wndHelpResultsSearchChild.InitHelpSearchResults();
if( !m_wndDebugBreakpointsBar.Create(
_T("Breakpoints"),
this,
ID_DEBUG_WINDOW_BREAKPOINTS
)
|| !m_wndDebugBreakpointsChild.Create(
CProfStudioBreakpointsView::IDD,
&m_wndDebugBreakpointsBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_BREAKPOINTS\n");
return -1; // fail to create
}
if( !m_wndDebugRunningDocumentsBar.Create(
_T("Running Documents"),
this,
ID_DEBUG_WINDOW_RUNNING_DOCUMENTS
)
|| !m_wndDebugRunningDocumentsChild.Create(
WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL
|ES_MULTILINE|ES_LEFT|ES_NOHIDESEL|ES_WANTRETURN
|ES_AUTOHSCROLL|ES_AUTOVSCROLL
,
CRect( 0,0,0,0 ),
&m_wndDebugRunningDocumentsBar,
UINT(IDC_STATIC)
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndDebugRunningDocumentsChild
)
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_RUNNING_DOCUMENTS\n");
return -1; // fail to create
}
m_wndDebugRunningDocumentsChild.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
if( !m_wndDebugWatch1Bar.Create(
_T("Watch 1"),
this,
ID_DEBUG_WINDOW_WATCH_1
)
|| !m_wndDebugWatch1Child.Create(
&m_wndDebugWatch1Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_WATCH_1\n");
return -1; // fail to create
}
if( !m_wndDebugWatch2Bar.Create(
_T("Watch 2"),
this,
ID_DEBUG_WINDOW_WATCH_2
)
|| !m_wndDebugWatch2Child.Create(
&m_wndDebugWatch2Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_WATCH_2\n");
return -1; // fail to create
}
if( !m_wndDebugWatch3Bar.Create(
_T("Watch 3"),
this,
ID_DEBUG_WINDOW_WATCH_3
)
|| !m_wndDebugWatch3Child.Create(
&m_wndDebugWatch3Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_WATCH_3\n");
return -1; // fail to create
}
if( !m_wndDebugWatch4Bar.Create(
_T("Watch 4"),
this,
ID_DEBUG_WINDOW_WATCH_4
)
|| !m_wndDebugWatch4Child.Create(
&m_wndDebugWatch4Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_WATCH_4\n");
return -1; // fail to create
}
if( !m_wndDebugAutosBar.Create(
_T("Autos"),
this,
ID_DEBUG_WINDOW_AUTOS
)
|| !m_wndDebugAutosChild.Create(
&m_wndDebugAutosBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_AUTOS\n");
return -1; // fail to create
}
if( !m_wndDebugLocalsBar.Create(
_T("Locals"),
this,
ID_DEBUG_WINDOW_LOCALS
)
|| !m_wndDebugLocalsChild.Create(
&m_wndDebugLocalsBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_LOCALS\n");
return -1; // fail to create
}
if( !m_wndDebugThisBar.Create(
_T("This"),
this,
ID_DEBUG_WINDOW_THIS
)
|| !m_wndDebugThisChild.Create(
&m_wndDebugThisBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_THIS\n");
return -1; // fail to create
}
if( !m_wndDebugCallStackBar.Create(
_T("Call Stack"),
this,
ID_DEBUG_WINDOW_CALL_STACK
)
|| !m_wndDebugCallStackChild.Create(
&m_wndDebugCallStackBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_CALL_STACK\n");
return -1; // fail to create
}
if( !m_wndDebugThreadsBar.Create(
_T("Threads"),
this,
ID_DEBUG_WINDOW_THREADS
)
|| !m_wndDebugThreadsChild.Create(
&m_wndDebugThreadsBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_THREADS\n");
return -1; // fail to create
}
if( !m_wndDebugModulesBar.Create(
_T("Modules"),
this,
ID_DEBUG_WINDOW_MODULES
)
|| !m_wndDebugModulesChild.Create(
&m_wndDebugModulesBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_MODULES\n");
return -1; // fail to create
}
if( !m_wndDebugMemory1Bar.Create(
_T("Memory 1"),
this,
ID_DEBUG_WINDOW_MEMORY_1
)
|| !m_wndDebugMemory1Child.Create(
CProfStudioMemoryView::IDD,
&m_wndDebugMemory1Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_MEMORY_1\n");
return -1; // fail to create
}
if( !m_wndDebugMemory2Bar.Create(
_T("Memory 2"),
this,
ID_DEBUG_WINDOW_MEMORY_2
)
|| !m_wndDebugMemory2Child.Create(
CProfStudioMemoryView::IDD,
&m_wndDebugMemory2Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_MEMORY_2\n");
return -1; // fail to create
}
if( !m_wndDebugMemory3Bar.Create(
_T("Memory 3"),
this,
ID_DEBUG_WINDOW_MEMORY_3
)
|| !m_wndDebugMemory3Child.Create(
CProfStudioMemoryView::IDD,
&m_wndDebugMemory3Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_MEMORY_3\n");
return -1; // fail to create
}
if( !m_wndDebugMemory4Bar.Create(
_T("Memory 4"),
this,
ID_DEBUG_WINDOW_MEMORY_4
)
|| !m_wndDebugMemory4Child.Create(
CProfStudioMemoryView::IDD,
&m_wndDebugMemory4Bar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_MEMORY_4\n");
return -1; // fail to create
}
if( !m_wndDebugDisassemblyBar.Create(
_T("Disassembly"),
this,
ID_DEBUG_WINDOW_DISASSEMBLY
)
|| !m_wndDebugDisassemblyChild.Create(
CProfStudioDisassemblyView::IDD,
&m_wndDebugDisassemblyBar
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_DISASSEMBLY\n");
return -1; // fail to create
}
if( !m_wndDebugRegistersBar.Create(
_T("Registers"),
this,
ID_DEBUG_WINDOW_REGISTERS
)
|| !m_wndDebugRegistersChild.Create(
WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL
|ES_MULTILINE|ES_LEFT|ES_NOHIDESEL|ES_WANTRETURN
|ES_AUTOHSCROLL|ES_AUTOVSCROLL
,
CRect( 0,0,0,0 ),
&m_wndDebugRegistersBar,
UINT(IDC_STATIC)
)
|| !( (new CProfStudioThinFrame)->
CreateDynamicThinFrame(
&m_wndDebugRegistersChild
)
)
)
{
TRACE0("Failed to create ID_DEBUG_WINDOW_REGISTERS\n");
return -1; // fail to create
}
m_wndDebugRegistersChild.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject(DEFAULT_GUI_FONT)
)
);
m_wndDebugRegistersChild.SetWindowText(
_T(" EAX = 00400000 EBX = 7FFDF000 ECX = 00000001 EDX = 00132C1F\r\n")
_T(" ESI = 00000000 EDI = 00000000 EIP = 0041D330 ESP = 0012FF14\r\n")
_T(" EBP = 0012FFC0 EFL = 00000246\r\n")
_T("\r\n")
_T("\r\n")
);
m_wndDebugRegistersChild.SetSel( -1, -1 );
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
m_wndStatusBar.m_bOuterRectInFirstBand = true;
_splash.SetStatusText(
_T("Configuring bars ...")
);
m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarStandard.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarUiLook.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarDebug.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarBuild.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarTextEditor.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarSourceControl.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarDataDesign.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarDebugLocation.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarXmlData.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarXmlSchema.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarQuery.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBarWeb.EnableDocking(CBRS_ALIGN_ANY);
m_wndSolutionExplorerBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndResourceViewBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndClassViewBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndServerExplorerBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndPropertiesBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolboxBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndPendingCheckingsBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndWebBrowserBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndObjectBrowserBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDocumentOutlineBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndTaskListBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndCommandWindowBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndOutputBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndFindResults1Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndFindResults2Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndFindSymbolResultsBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndFavoritesBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndMacroExplorerBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDynamicHelpBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndHelpContentsBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndHelpIndexBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndHelpSearchBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndHelpResultsIndexBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndHelpResultsSearchBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugBreakpointsBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugRunningDocumentsBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugWatch1Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugWatch2Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugWatch3Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugWatch4Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugAutosBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugLocalsBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugThisBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugCallStackBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugThreadsBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugModulesBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugMemory1Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugMemory2Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugMemory3Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugMemory4Bar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugDisassemblyBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndDebugRegistersBar.EnableDocking(CBRS_ALIGN_ANY);
if( !CExtControlBar::FrameEnableDocking(this) )
{
ASSERT( FALSE );
return -1;
}
if( !CExtControlBar::FrameInjectAutoHideAreas(this) )
{
ASSERT( FALSE );
return -1;
}
_splash.SetStatusText(
_T("Loading last state ...")
);
if( !CExtControlBar::ProfileBarStateLoad(
this,
pApp->m_pszRegistryKey,
pApp->m_pszProfileName,
pApp->m_pszProfileName,
&m_dataFrameWP
)
)
{ // if state not loaded - dock initial layout
_splash.SetStatusText(
_T("Docking toolbars ...")
);
DockControlBar(&m_wndMenuBar);
DockControlBar(&m_wndToolBarStandard);
DockControlBar(&m_wndToolBarWeb);
DockControlBar(&m_wndToolBarDebug);
RecalcLayout();
CRect wrAlreadyDockedBar;
m_wndToolBarDebug.GetWindowRect( &wrAlreadyDockedBar );
wrAlreadyDockedBar.OffsetRect( 1, 0 );
DockControlBar(&m_wndToolBarBuild,AFX_IDW_DOCKBAR_TOP,&wrAlreadyDockedBar);
RecalcLayout();
m_wndToolBarBuild.GetWindowRect( &wrAlreadyDockedBar );
wrAlreadyDockedBar.OffsetRect( 1, 0 );
DockControlBar(&m_wndToolBarTextEditor,AFX_IDW_DOCKBAR_TOP,&wrAlreadyDockedBar);
DockControlBar(&m_wndToolBarDataDesign,AFX_IDW_DOCKBAR_LEFT);
RecalcLayout();
m_wndToolBarDataDesign.GetWindowRect( &wrAlreadyDockedBar );
wrAlreadyDockedBar.OffsetRect( 0, 1 );
DockControlBar(&m_wndToolBarXmlData,AFX_IDW_DOCKBAR_LEFT,&wrAlreadyDockedBar);
RecalcLayout();
m_wndToolBarXmlData.GetWindowRect( &wrAlreadyDockedBar );
wrAlreadyDockedBar.OffsetRect( 0, 1 );
DockControlBar(&m_wndToolBarXmlSchema,AFX_IDW_DOCKBAR_LEFT,&wrAlreadyDockedBar);
DockControlBar(&m_wndToolBarUiLook,AFX_IDW_DOCKBAR_RIGHT);
DockControlBar(&m_wndToolBarDebugLocation,AFX_IDW_DOCKBAR_BOTTOM);
DockControlBar(&m_wndToolBarSourceControl,AFX_IDW_DOCKBAR_BOTTOM);
RecalcLayout();
m_wndToolBarSourceControl.GetWindowRect( &wrAlreadyDockedBar );
wrAlreadyDockedBar.OffsetRect( 1, 0 );
DockControlBar(&m_wndToolBarQuery,AFX_IDW_DOCKBAR_BOTTOM,&wrAlreadyDockedBar);
RecalcLayout();
_splash.SetStatusText(
_T("Docking panels: project management ...")
);
m_wndResourceViewBar.SetInitDesiredSizeVertical( CSize(200,30) );
m_wndResourceViewBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_LEFT, true );
m_wndResourceViewBar.DockControlBarIntoTabbedContainer(
&m_wndSolutionExplorerBar, -1, NULL, false );
m_wndResourceViewBar.DockControlBarIntoTabbedContainer(
&m_wndClassViewBar, 0, NULL, false );
RecalcLayout();
m_wndServerExplorerBar.SetInitDesiredSizeVertical( CSize(200,30) );
m_wndServerExplorerBar.DockControlBarLTRB(
&m_wndResourceViewBar, AFX_IDW_DOCKBAR_BOTTOM );
m_wndServerExplorerBar.DockControlBarIntoTabbedContainer(
&m_wndMacroExplorerBar, -1, NULL, false );
_splash.SetStatusText(
_T("Docking panels: help system ...")
);
m_wndHelpIndexBar.SetInitDesiredSizeVertical( CSize(200,30) );
m_wndHelpIndexBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_RIGHT, true );
m_wndHelpIndexBar.DockControlBarIntoTabbedContainer(
&m_wndHelpSearchBar, -1, NULL, false );
m_wndHelpIndexBar.DockControlBarIntoTabbedContainer(
&m_wndHelpResultsIndexBar, -1, NULL, false );
m_wndHelpIndexBar.DockControlBarIntoTabbedContainer(
&m_wndHelpResultsSearchBar, -1, NULL, false );
m_wndHelpIndexBar.DockControlBarIntoTabbedContainer(
&m_wndHelpContentsBar, 0, NULL, false );
_splash.SetStatusText(
_T("Docking panels: outputs and source control ...")
);
m_wndOutputBar.SetInitDesiredSizeHorizontal( CSize(400,200) );
m_wndOutputBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_BOTTOM, true );
m_wndOutputBar.DockControlBarIntoTabbedContainer(
&m_wndTaskListBar, -1, NULL, false );
m_wndOutputBar.DockControlBarIntoTabbedContainer(
&m_wndPropertiesBar, -1, NULL, false );
m_wndOutputBar.DockControlBarIntoTabbedContainer(
&m_wndCommandWindowBar, -1, NULL, false );
RecalcLayout();
m_wndObjectBrowserBar.DockControlBarLTRB(
&m_wndOutputBar, AFX_IDW_DOCKBAR_RIGHT );
m_wndObjectBrowserBar.DockControlBarIntoTabbedContainer(
&m_wndPendingCheckingsBar, -1, NULL, false );
RecalcLayout();
m_wndFindResults2Bar.DockControlBarLTRB(
&m_wndHelpIndexBar, AFX_IDW_DOCKBAR_BOTTOM );
m_wndFindResults2Bar.DockControlBarIntoTabbedContainer(
&m_wndFindSymbolResultsBar, -1, NULL, false );
m_wndFindResults2Bar.DockControlBarIntoTabbedContainer(
&m_wndFindResults1Bar, 0, NULL, false );
_splash.SetStatusText(
_T("Docking panels: document tools and browsers ...")
);
m_wndToolboxBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_RIGHT, true );
m_wndToolboxBar.DockControlBarIntoTabbedContainer(
&m_wndDocumentOutlineBar, -1, NULL, false );
m_wndWebBrowserBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_BOTTOM, true );
m_wndWebBrowserBar.DockControlBarIntoTabbedContainer(
&m_wndFavoritesBar, -1, NULL, false );
m_wndWebBrowserBar.DockControlBarIntoTabbedContainer(
&m_wndDynamicHelpBar, 0, NULL, false );
_splash.SetStatusText(
_T("Docking panels: breakpoints and debug info ...")
);
m_wndDebugBreakpointsBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_LEFT, true );
m_wndDebugBreakpointsBar.DockControlBarIntoTabbedContainer(
&m_wndDebugRunningDocumentsBar, -1, NULL, false );
m_wndDebugAutosBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_TOP, true );
m_wndDebugAutosBar.DockControlBarIntoTabbedContainer(
&m_wndDebugLocalsBar, -1, NULL, false );
m_wndDebugAutosBar.DockControlBarIntoTabbedContainer(
&m_wndDebugThisBar, -1, NULL, false );
m_wndDebugAutosBar.DockControlBarIntoTabbedContainer(
&m_wndDebugWatch1Bar, -1, NULL, false );
m_wndDebugAutosBar.DockControlBarIntoTabbedContainer(
&m_wndDebugWatch2Bar, -1, NULL, false );
m_wndDebugAutosBar.DockControlBarIntoTabbedContainer(
&m_wndDebugWatch3Bar, -1, NULL, false );
m_wndDebugAutosBar.DockControlBarIntoTabbedContainer(
&m_wndDebugWatch4Bar, -1, NULL, false );
m_wndDebugCallStackBar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_TOP, true );
m_wndDebugCallStackBar.DockControlBarIntoTabbedContainer(
&m_wndDebugThreadsBar, -1, NULL, false );
m_wndDebugCallStackBar.DockControlBarIntoTabbedContainer(
&m_wndDebugModulesBar, -1, NULL, false );
RecalcLayout();
_splash.SetStatusText(
_T("Docking panels: memory and disassembly ...")
);
m_wndDebugDisassemblyBar.DockControlBarLTRB(
&m_wndDebugCallStackBar, AFX_IDW_DOCKBAR_RIGHT );
m_wndDebugDisassemblyBar.DockControlBarIntoTabbedContainer(
&m_wndDebugRegistersBar, -1, NULL, false );
m_wndDebugMemory1Bar.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_BOTTOM, true );
m_wndDebugMemory1Bar.DockControlBarIntoTabbedContainer(
&m_wndDebugMemory2Bar, -1, NULL, false );
m_wndDebugMemory1Bar.DockControlBarIntoTabbedContainer(
&m_wndDebugMemory3Bar, -1, NULL, false );
m_wndDebugMemory1Bar.DockControlBarIntoTabbedContainer(
&m_wndDebugMemory4Bar, -1, NULL, false );
_splash.SetStatusText(
_T("Updating state ...")
);
RecalcLayout();
//m_wndClassViewBar.AutoHideModeSet( true, false, false, true );
//m_wndHelpContentsBar.AutoHideModeSet( true, false, false, true );
//m_wndOutputBar.AutoHideModeSet( true, false, false, true );
//m_wndServerExplorerBar.AutoHideModeSet( true, false, false, true );
//m_wndFindResults1Bar.AutoHideModeSet( true, false, false, true );
m_wndWebBrowserBar.AutoHideModeSet( true, false, false, true );
m_wndToolboxBar.AutoHideModeSet( true, false, false, true );
m_wndDebugBreakpointsBar.AutoHideModeSet( true, false, false, true );
m_wndDebugAutosBar.AutoHideModeSet( true, false, false, true );
m_wndDebugCallStackBar.AutoHideModeSet( true, false, false, true );
m_wndDebugDisassemblyBar.AutoHideModeSet( true, false, false, true );
m_wndDebugMemory1Bar.AutoHideModeSet( true, false, false, true );
m_wndObjectBrowserBar.AutoHideModeSet( true, false, false, true );
//ShowControlBar( &m_wndMenuBar, FALSE, TRUE );
//ShowControlBar( &m_wndToolBarStandard, FALSE, TRUE );
//ShowControlBar( &m_wndToolBarUiLook, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarDebug, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarBuild, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarTextEditor, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarSourceControl, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarDataDesign, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarDebugLocation, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarXmlData, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarXmlSchema, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarQuery, FALSE, TRUE );
// ShowControlBar( &m_wndToolBarWeb, FALSE, TRUE );
} // if state not loaded - dock initial layout
#if (!defined __EXT_MFC_NO_TABMDI_CTRL )
if( ! m_wndMdiTabs.Create(
this,
CRect(0,0,0,0),
UINT(IDC_STATIC),
WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS,
__ETWS_MDI_DEFAULT|__ETWS_HIDE_ICONS
)
)
{
TRACE0("Failed to create m_wndMdiTabs\n");
return -1; // fail to create
}
m_wndMdiTabs.ModifyTabWndStyle( 0, __ETWS_SHOW_BTN_TAB_LIST|__ETWS_ENABLED_BTN_TAB_LIST );
#endif // (!defined __EXT_MFC_NO_TABMDI_CTRL )
_splash.DestroyWindow();
PostMessage( WM_COMMAND, ID_FILE_NEW );
return 0;
}
|
|
tera tera
|
Aug 27, 2009 - 11:07 PM
|
I cannot judge a domain of the tree control
(The theme is CExtPaintManagerStudio2008.) I want to draw a frame line
Please teach a method to draw a frame line
|
|
Technical Support
|
Aug 28, 2009 - 1:47 PM
|
The CExtSplitterWnd::OnDrawSplitter() virtual method can be overridden and you can draw any splitters you like.
|
|
Lynn Reid
|
Aug 27, 2009 - 8:31 PM
|
I just updated from version 2.54 to 2.85 and now I can’t get my programs to run. (I didn’t want to upgrade, just had a major disk crash and needed source code again d’oh.) I initialize in MyApp::InitInstance with VERIFY(
g_CmdManager->ProfileSetup(
__PROF_UIS_PROJECT_CMD_PROFILE_NAME
)
);
g_PaintManager.InstallPaintManager( RUNTIME_CLASS(CExtPaintManagerXP));
AfxEnableControlContainer(); The code aborts in the InstallPaintManager command in routine CExtBitmap::LoadBMP_Resource at line
hInst =
g_ResourceManager->FindResourceHandle(
sResourceType,
(UINT)(__EXT_MFC_UINT_PTR)(LPCTSTR)sResourceID
); Any hints as to what I have to do to make this compatible again? I’ve tried creating a new Prof-UIS project with the wizard and comparing code but I can’t find the key after several hours of attempts. I’m running Visual C++ 6.0, compiling with MFC in a static library.
many thanks
Lynn
|
|
Technical Support
|
Aug 28, 2009 - 1:47 PM
|
Please take a look at the .rc2 file in any of Prof-UIS sample applications. This file contains the following lines:
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif
Please add these lines into the .rc2 file of your project. They needed for including Prof-UIS resources into your compiled application.
|
|
Robert Hofstetter
|
Aug 27, 2009 - 7:23 PM
|
I am using CExtReportGridWnd. I’d like to warn users for accidental drag and remove a column
and how to cancel the operation if user want?
|
|
Technical Support
|
Aug 28, 2009 - 1:40 PM
|
It’s possible to prevent drag-n-dropping of particular columns. You can apply the __EGCS_EX_DISABLE_START_DRAG extended grid cell style to CExtReportGridColumn report grid column objects (they are really instances of grid header cells displayed at the top header area of the CExtReportGridWnd report grid control). If you need to display some message about the disabled drag-n-drop behavior for particular report grid column, then you should define your own CExtReportGridColumn -derived class and implement the CExtReportGridColumn::DragDropEnabledGet() virtual method in it. This method can display some message box before returning the false flag. The CExtReportGridWnd::ReportColumnRegister() method allows you to specify the run-time class information of your CExtReportGridColumn -derived class.
You can allow your users to drag-n-drop any columns. But you can disable the removing of particular columns via dragging them out of the header area of the report grid control. The CExtGridWnd::OnGridOuterDragOut virtual method allows you to catch the column dragging out even. You can override it without invoking the parent class method and this will disable the dragging out of header columns in the CExtGridWnd , CExtTreeGridWnd and CExtReportGridWnd controls.
The two solutions above are described just for some advanced tricks you may need in the future.
There is the third solution which is more simple. The report grid column hiding action is called the report column de-activation. This action is always performed via the CExtReportGridWnd::ReportColumnActivate() virtual method invocation:
virtual bool ReportColumnActivate( // default parameters will activate/deactivate all the columns
__EXT_MFC_SAFE_LPCTSTR strColumnName = NULL,
__EXT_MFC_SAFE_LPCTSTR strCategoryName = NULL,
bool bActivate = true,
LONG nColNo = -1L, // -1L - activate last
bool bRedraw = true
);
You can override this virtual method in your CExtReportGridWnd -derived class and invoke the parent class method with the bActivate flag parameter set to true flag for the columns which must be never deactivated by user. This third solution looks like the most simple and fitting your needs. It also allows to display message boxes with some warning messages for particular columns.
|
|
Antonio Pelli Neto
|
Aug 27, 2009 - 6:58 AM
|
Hello,<o:p></o:p> If you uncomment the line 1682 from the ChildView.cpp (CExtGridCellCurrency), on the FormulaGrid sample, you will get an assert in the debug mode. The same assert will occur if you run the sample, select the cell (9,2) and try to change the check box control from checked to unchecked using the keyboard (space).<o:p></o:p> Dispite ot these problems, the Formula Grid is a great piece of code and very useful. Pelli
|
|
Technical Support
|
Aug 27, 2009 - 1:08 PM
|
The following commented line of code is really present in the FormulaBar sample application and if you uncomment it, then it will perform the incomplete initialization of the currency grid cell:
GridCellGet( 9L, 10L, 0, 0, RUNTIME_CLASS(CExtGridCellCurrency) );
The CExtGridCellCurrency grid cell class is the OLE VARIANT data structure based grid cell. This grid cell class simply uses the OLE currency editor control for in-place grid cell editing. Please perform the complete initialization of the currency grid cell to avoid assertions: COleCurrency oleCurrency( 0L, 0L );
((CExtGridCellCurrency*)GridCellGet( 9L, 10L, 0, 0, RUNTIME_CLASS(CExtGridCellCurrency) ))->_VariantAssign( oleCurrency );
|
|
Antonio Pelli Neto
|
Aug 27, 2009 - 2:10 PM
|
|
|
Lars Mohr
|
Aug 26, 2009 - 3:34 PM
|
Hi support team, is there a way that I can create a CExtPropertyStore (including CExtPropertyItems aso) object in a dll and pass the pointer to the exe where is the CExtPropertyGridCtrl ? I get an error in the function CExtPropertyCategory::Combine at this point: DYNAMIC_DOWNCAST( CExtPropertyCategory, pOtherItem ); because the Runtime classes are on different physical locations. What is the best solution for that? For the dll I use the ProfUIS285md-RDE.dll regards lars
|
|
Lars Mohr
|
Aug 27, 2009 - 2:13 PM
|
My dll is a "<label id="DLL_TYPE_REGULAR_LABEL" for="DLL_TYPE_REGULAR">Regular DLL using shared MFC DLL</label> " and I load the dll via HINSTANCE hLib = ::LoadLibraryA( strLibPathA ) . Is this possible to use this dll type? I will send you a test programm to support@prof-uis.com
|
|
Technical Support
|
Aug 29, 2009 - 4:22 AM
|
Thank you for the test projects. We fixed them and replied your e-mail with attachment.
|
|
Lars Mohr
|
Aug 30, 2009 - 3:27 PM
|
Thank you for the fast answer & detailed description...
|
|
Technical Support
|
Aug 27, 2009 - 8:50 AM
|
Yes, you can create property stores in DLLs used from MFC regular DLL based on Prof-UIS RDE DLL. But the DLL project which creates property stores should be MFC/RDE extension DLL. It should be loaded by your regular DLL via static/stub dependency or via AfxLoadLibrary() API invocation.
|
|
tera tera
|
Aug 26, 2009 - 12:27 AM
|
Hello. When I clicked the point of the red frame, I do not want to perform On/Off of the check box.
When I clicked the point of the green frame, I want to perform On/Off of the check box.
|
|
Technical Support
|
Aug 28, 2009 - 1:48 PM
|
We already fixed this issue. Thank you. Here is the updated tree control:
http://www.prof-uis.com/download/forums/tmp/Updated-CExtTreeCtrl-for-TeraT.zip
Here is the required update for the drag-n-drop detection methods:
bool CExtControlBar::stat_DragDetect_ImplStep(
HWND hWnd,
POINT pt,
UINT nUpMessage // = WM_LBUTTONUP
)
{
if( hWnd == NULL || (! ::IsWindow( hWnd ) ) )
return false;
CSize sizeDrag( ::GetSystemMetrics( SM_CXDRAG ), ::GetSystemMetrics( SM_CYDRAG ) );
CRect rc( pt.x - sizeDrag.cx, pt.y - sizeDrag.cy, pt.x + sizeDrag.cx, pt.y + sizeDrag.cy );
::SetCapture( hWnd );
for( MSG _msg; ::IsWindow( hWnd ) ; )
{
for( ;
::IsWindow( hWnd )
&& ( ::PeekMessage( &_msg, hWnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE )
|| ::PeekMessage( &_msg, 0, WM_CANCELMODE, WM_CANCELMODE, PM_NOREMOVE )
|| ::PeekMessage( &_msg, 0, WM_ACTIVATEAPP, WM_ACTIVATEAPP, PM_NOREMOVE )
)
;
)
{
if( _msg.message == nUpMessage
|| _msg.message == WM_CANCELMODE
|| _msg.message == WM_ACTIVATEAPP
)
{
::ReleaseCapture();
return false;
}
::PeekMessage( &_msg, hWnd, _msg.message, _msg.message, PM_REMOVE );
if( _msg.message == WM_MOUSEMOVE )
{
CPoint ptMessage( LOWORD( _msg.lParam ), HIWORD( _msg.lParam ) );
if( ! rc.PtInRect( ptMessage ) )
{
ReleaseCapture();
return true;
}
}
}
::WaitMessage();
}
return false;
}
bool CExtControlBar::stat_DoDragDetect(
HWND hWnd,
const POINT & ptWndClient,
UINT nUpMessage // = WM_LBUTTONUP
)
{
if( hWnd == NULL || (! ::IsWindow( hWnd ) ) )
return false;
CPoint ptScreen = ptWndClient;
::ClientToScreen( hWnd, &ptScreen );
for( ; stat_DragDetect_ImplStep( hWnd, ptScreen, nUpMessage ) ; )
{
POINT ptCursorPos = { -32767, -32767 };
if( ! ::GetCursorPos( &ptCursorPos ) )
return false;
if( ptScreen == ptCursorPos )
continue; //only drag time elapsed but mouse is not moved
return true;
}
return false;
}
|
|
tera tera
|
Aug 31, 2009 - 10:53 PM
|
Please upload a revision in profuis-com. Thanks,
|
|
Technical Support
|
Sep 1, 2009 - 11:37 AM
|
We have just uploaded it.
|
|
Technical Support
|
Aug 27, 2009 - 4:55 AM
|
|
|
tera tera
|
Aug 28, 2009 - 12:03 AM
|
The check box does not react even if I click check box.
|
|
Jean Gareau
|
Aug 25, 2009 - 6:01 PM
|
We converted an app (using 2.85) by replacing its menu by a ribbon. Thanks to the RibbonBar example, the transition went smoothly. Everything is working, but there’s some bar redrawing that occurs when the application is launched. For instance, on Vista, the Quick Access Toolbar is clearly drawn (with a black background) under the application’s title bar and then is "moved up" in the title bar after a very noticeable delay (maybe 500 ms). The behavior is also similar in XP. Interestingly enough, we had this issue in Debug mode only. When we tried in Release, that issue did not occur (we could not see it). We went ahead and added all the nodes in the ribbon, and at some point the problem came back, in both Debug and Release mode. The ribbon code is nearly identical to the RibbonBar. It should be noted that after that delay of 500 ms (or so), the application is properly redrawn: both the ribbon and title bar (with the File icon and the Quick Access Toolbar) are ok. Do you have any thoughts as to why there is that "drawing delay" and how it can be avoided?
|
|
Jean Gareau
|
Aug 26, 2009 - 1:00 PM
|
We replied a little too fast. although the delay is gone, some of the drawing is incorrect until we resize the app (even by 1 pixel). We sent you an email with a screenshot. Thank you.
|
|
Technical Support
|
Aug 27, 2009 - 7:56 AM
|
We received your e-mail and replied it.
|
|
Jean Gareau
|
Aug 26, 2009 - 12:27 PM
|
Problem solved. To answer your question: it uses a timer but it’s a one-shot timer that is set in OnCreate() for 1500 ms i.e. SetTimer(1, 1500, NULL). OnIdle() is not overridden. So that was not the issue in our case. But we looked again at the RibbonBar sample and found out that the paint manager is installed in the main frame’s ctor. We solved the issue by moving it from our app’s main frame’s OnCreate (where it was) to the ctor as well, and the issue just went away.
|
|
Technical Support
|
Aug 26, 2009 - 11:37 AM
|
Do you use any "heavy" code in the WM_TIMER message handler methods or in the application’s OnIdle() virtual method? You can send us your main frame’s source code and we will check it.
|
|
Jean Gareau
|
Aug 25, 2009 - 5:53 PM
|
The app uses a page navigator with a CExtSplitterWnd, where the right pane is my custom window. It uses a class without CS_HREDRAW and CS_VREDRAW. That custom window does not flicker when resizing the app vertically (using the bottom edge). But it flickers whe nresizing using the right edge. Also, the flickering occurs is somewhat slower than if the CS_HREDRAW and CS_VREDRAW were present. When present, the flickering is very fast. Without those flags, the horizontal flickering occurs slower (maybe every 10 ms, rough guess), which seems to confirm that the flickering is originated be some window (?) which forces the background to be redrawn. This problem did not occur using the exact same code in 2.62. It appeared after upgrading to 2.85. Any idea? Thanks
|
|
Technical Support
|
Aug 26, 2009 - 11:36 AM
|
Please ensure your window is created with the WS_CLIPCHILDREN|WS_CLIPSIBLINGS standard window styles, whether it handles the WM_ERASEBKGND message and does nothing (do not draw anything, do not invoke parent class handler method) and, finally, whether the WM_PAINT message uses memory GDU device context for flicker free painting.
|
|