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 |
|
Offer Har
|
Jun 5, 2008 - 11:20 AM
|
I have a tree grid control, and I would like to change the color where the nodes are displayed - not including the cells: I tried overriding OnSiwPaintBackground , but it changed the color of all the cells background as well. I cannot go over all my call types and changed their background color, because there are many, and many more to come, and they should not be affected by the type of control they are in. Can this be done, how? Thanks, Ron
|
|
Offer Har
|
Jun 5, 2008 - 1:22 PM
|
Does it mean that by default the cells do not paint their background? If so, then how can I paint their background from the grid (again, I cannot do it from the cells)
|
|
Technical Support
|
Jun 5, 2008 - 1:15 PM
|
You should implement the CExtGridWnd::OnGridHookCellPaintBackground() virtual method and return true if your code paints the background of a grid cell. The returning false means the default background painting.
|
|
Offer Har
|
Jun 16, 2008 - 10:22 AM
|
Asking again: Does it mean that by default the cells do not paint their background? If so, then how can I paint their background from the grid (again, I cannot do it from the cells)
|
|
Technical Support
|
Jun 16, 2008 - 1:58 PM
|
Yes, by default the grit paints background for all its cells. A cell object paints its background only if you specify a custom background color for it. You should override the CExtGridWnd::OnGridHookCellPaintBackground() virtual method as we described in our previous answer in this thread.
|
|
Offer Har
|
Jun 24, 2008 - 10:06 AM
|
Dear Support, Can you please explain what you mean by using OnGridHookCellPaintBackground ? what does this function do? how to use it? Thanks, Ron.
|
|
Offer Har
|
Jun 17, 2008 - 10:58 AM
|
I can’t find documentation of this function - can you explain what it does and how it helps my case? Thanks, Ron.
|
|
Oliver Rau
|
Jun 5, 2008 - 9:36 AM
|
Dear ProfUIS-Team, we have problems with the correct localization of a button string in our RibbonBar’s "File->Options" that is displayed based on the system language and NOT based on the current dialog language. In a function CMainFrame::SetProfUISLanguage the following functions are called: g_ResourceManager->AllowCustomLang (true);
g_ResourceManager->SetLangIdDesired (LangInfo.GetLangId()); This function CMainFrame::SetProfUISLanguage is being called from int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
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’) );
pApp;
// [PROF-UIS RESOURCES] set the Prof-UIS resource language
SetProfUISLanguage();
if (CExtNCW < CMDIFrameWnd >::OnCreate(lpCreateStruct) == -1)
return -1;
VERIFY(
g_CmdManager->ProfileWndAdd(
theApp.m_pszProfileName,
GetSafeHwnd()
)
);
[...]
} I’ll send you a screenshot that illustrates the problem with an extra email. Thanks in advance, Martin
|
|
Oliver Rau
|
Jun 6, 2008 - 2:58 AM
|
We are using Prof-UIS resources for this. It’s the IDD_EXT_RIBBON_QATB_CUSTOMIZE_MODIFY that’s not localized properly.MODIFY</code> that’s not localized properly. I get the german string "Anpassen" even if I have english as my current dialog language using the upper resource manager mechanism.
|
|
Technical Support
|
Jun 5, 2008 - 1:14 PM
|
The ID_EXT_RIBBON_FILE_MENU_OPTIONS resource contains the text on the Options button in the ribbon bar’s File menu. We guess it’s simply not translated in the language resources you are using. Please let us know which language resources you are using?
|
|
howard liu
|
Jun 5, 2008 - 8:10 AM
|
Hi, Is it possible to host control like combo box and drop down box within the advanced Prof-UI tool bars. Is there a sample or demo code for this Thanks Howard
|
|
Technical Support
|
Jun 6, 2008 - 1:13 PM
|
Yes, of course it is possible. You should use the CExtToolControlBar::SetButtonCtrl() method which attaches a window handle to a toolbar button. You can take a look how the m_wndComboSolutionCfg combo box is created as a toolbar button in the ProfStudio sample.
|
|
howard liu
|
Jun 5, 2008 - 8:05 AM
|
Hi, Is it possible to load 32 bit tool bar icons over the Prof-UI advanced tool bars ? if so what is the procedure. Presently we have been loading 16 bit icons Thanks, Howard
|
|
Technical Support
|
Jun 6, 2008 - 1:12 PM
|
Prof-UIS allows you to have Windows Vista quality images on any Windows OS starting from Windows 95, which is demonstrated in the FunnyBars sample. The ..\Prof-UIS\Samples\FunnyBars\Res.IDR_TOOLBAR_VISTA_ICONS.bmp file is a 32-bit BMP file with alpha channel. It is not displayed correctly neither by the Windows shell viewer nor by the MSPaint bitmap editor nor by built in bitmap editor of any Visual Studio. This bitmap is used in the CMainFrame::m_wndToolBarVista toolbar window of the FunnyBars sample and there are no some special steps that create a toolbar there. This toolbar is simply initialized by using the ordinary Create() and LoadToolBar() methods. There is also an article How to load a PNG image from a file and use it in my application? which can be helpful in this regard.
|
|
Gevork Odabashyan
|
Jun 5, 2008 - 2:57 AM
|
I’m using 2.82 with VC2008.
I try MDI and MDI_DynamicBars samples.
The problem is that the MDI childs and dynamic bars
do not have their Tabs in MDI window.
With VC2003 all work correct.
|
|
Gevork Odabashyan
|
Jun 6, 2008 - 1:41 AM
|
Thanks, it’s work. It would be really helpful to have a listing of recommended and/or required changes to existing ProfUIS applications when switching from VS2003/VS2005 to VS2008 as Johnny Booth suggested. May be it would be helpfull to open new thread for this issue?
|
|
Technical Support
|
Jun 5, 2008 - 11:56 AM
|
There is a new feature introduced in MFC 9.0 and Visual Studio 2008: the IDC_STATIC constant cannot be used as the dialog control identifier of a control bar window (and other windows) which take up parts of the main frame window in the same way as control bars do. So, please modify the MDI tab window creation code in the CMainFrame::OnCreate() method: #if (!defined __EXT_MFC_NO_TABMDI_CTRL)
if( ! m_wndMdiTabs.Create(
this,
CRect(0,0,0,0),
1, // UINT(IDC_STATIC), <------------- this line was changed -------------
WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
__ETWS_MDI_DEFAULT|__ETWS_HIDE_ICONS|__ETWS_ITEM_DRAGGING
)
)
{
ASSERT( FALSE );
return -1;
}
// m_wndMdiTabs.ModifyTabWndStyleEx( 0, __ETWS_EX_CLOSE_ON_TABS, false );
#endif // (!defined __EXT_MFC_NO_TABMDI_CTRL)
|
|
Johnny Booth
|
Jun 5, 2008 - 11:03 AM
|
I had a similar issue with my MDI app when switching from VS2003 to VS2008. Have a look at the DrawCLI sample. Try creating your MDI tab control then modify the tab style(s) after the call to Create: #if (!defined __EXT_MFC_NO_TABMDI_CTRL)
if( !m_wndMdiTabs.Create( this ) )
{
ASSERT( FALSE );
return -1;
}
m_wndMdiTabs.ModifyTabWndStyle(
0,
__ETWS_ONENOTE_DEFAULT
| __ETWS_SHOW_BTN_TAB_LIST
| __ETWS_ENABLED_BTN_TAB_LIST
| __ETWS_ITEM_DRAGGING
| __ETWS_SHOW_BTN_CLOSE
,
true
);
m_wndMdiTabs.ModifyTabWndStyleEx(
0,
__ETWS_EX_CLOSE_ON_TABS|__ETWS_EX_CLOSE_ON_SELECTED_ONLY
);
#endif // (!defined __EXT_MFC_NO_TABMDI_CTRL)
|
|
Technical Support
|
Jun 5, 2008 - 1:24 PM
|
You can find the discussion about this here.
|
|
Johnny Booth
|
Jun 5, 2008 - 1:20 PM
|
This works too, it was copied and pasted directly from the 2.82 DrawCli sample which works when compiled in VS2008. It would be really helpful if there was a listing of recommended and/or required changes to existing ProfUIS applications when switching from VS2003/VS2005 to VS2008.
|
|
Technical Support
|
Jun 5, 2008 - 11:58 AM
|
You should specify the dialog control identifier value in MDI tabs creation method explicitly and it should not be equal to the IDC_STATIC value.
|
|
Gevork Odabashyan
|
Jun 6, 2008 - 1:45 AM
|
Thanks, it’s work.
It would be really helpful to have a listing of recommended and/or required changes to existing ProfUIS applications when switching from VS2003/VS2005 to VS2008 as Johnny Booth suggested.
May be it would be helpfull to open new thread for this issue?
|
|
Offer Har
|
Jun 4, 2008 - 2:39 PM
|
There is a problem in the way you paint combo-box in 2.83, which is related to my problem of some extra line to the left of the drop arrow. As you can see below, in a standard combo-box, when it’s in focus, the blue fill color does not go all the way to the right as it should: This is exactly the place where in ownerdraw combo I get an extra line. I think that if you’ll fix this problem, it will fix my extra line problem. Thanks, Ron.
|
|
Offer Har
|
Jun 16, 2008 - 10:23 AM
|
Any ideas how to fix this problem? Did you look at it?
|
|
Technical Support
|
Jun 17, 2008 - 3:49 AM
|
We cannot agree that it is a bug. The empty space together with drop down button occupies the space which is required for painting standard system drop-down button and we cannot decrease its width. It is system-controlled. So what we have to do is to paint our button, which has the a smaller width, and then the rest area fill with thebackground color. We don’t see any painting problems in any of our samples.
|
|
Offer Har
|
Jun 17, 2008 - 5:19 AM
|
I’m sorry, but you cannot dismiss this by saying this is not a bug, here is a combo from visual studio 2005: You can see clearly that the spaces on all sides are even, as opposed to your implementation which yields uneven borders: The extra line bug I reported is clearly there, and I will send you a sample project with it later, and if you will look it falls exactly into the same space of un-even edges of the combo:
|
|
Technical Support
|
Jul 8, 2008 - 7:10 AM
|
We figured out what the problem was. It occurred only when your application didn’t use the XP themes manifest.
To fix the problem, please update the following method and recompile the library: void CExtPaintManagerOffice2007_Impl::PaintComboFrame(
CDC & dc,
CExtPaintManager::PAINTCOMBOFRAMEDATA & _pcfd
)
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
if( IsHighContrast() )
{
CExtPaintManagerXP::PaintComboFrame(
dc,
_pcfd
);
return;
}
if( _pcfd.m_pHelperSrc != NULL
&& _pcfd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtPopupMenuWnd) )
&& ( ((CExtPopupMenuWnd*)_pcfd.m_pHelperSrc)->TrackFlagsGet() & TPMX_RIBBON_MODE ) == 0
)
{
CExtPaintManagerOffice2003::PaintComboFrame( dc, _pcfd );
return;
}
CExtComboBoxBase * pWndCombo = NULL;
if( _pcfd.m_pHelperSrc != NULL
&& _pcfd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtComboBoxBase ) )
)
{
pWndCombo = STATIC_DOWNCAST( CExtComboBoxBase, _pcfd.m_pHelperSrc );
ASSERT_VALID( pWndCombo );
}
if( m_bmpArrComboBoxDropDown.IsEmpty()
|| _pcfd.m_pHelperSrc == NULL
|| _pcfd.m_clrForceNABorder != COLORREF(-1L)
|| _pcfd.m_clrForceNAContent != COLORREF(-1L)
|| _pcfd.m_clrForceActiveOuterBorder != COLORREF(-1L)
|| (! ( _pcfd.m_pHelperSrc->IsKindOf(RUNTIME_CLASS(CComboBox))
|| _pcfd.m_pHelperSrc->IsKindOf(RUNTIME_CLASS(CExtBarButton))
|| _pcfd.m_pHelperSrc->IsKindOf(RUNTIME_CLASS(CExtPopupMenuWnd))
)
)
|| (! GetCb2DbTransparentMode(_pcfd.m_pHelperSrc) )
|| ::GetDeviceCaps( dc.m_hDC, BITSPIXEL ) <= 8
)
{
CExtPaintManagerOffice2003::PaintComboFrame( dc, _pcfd );
if( (!_pcfd.m_bEnabled) && pWndCombo != NULL )
{
ASSERT_VALID( pWndCombo );
CRect rcClip( _pcfd.m_rcClient );
rcClip.DeflateRect(1,1);
dc.ExcludeClipRect( &rcClip );
CExtPaintManagerOffice2003::PaintDockerBkgnd( true, dc, pWndCombo );
dc.SelectClipRgn( NULL );
}
return;
}
bool bPopupMenuComboFieldMode = false;
if( _pcfd.m_pHelperSrc != NULL
&& _pcfd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtPopupMenuWnd) )
)
bPopupMenuComboFieldMode = true;
INT nDD = GetDropDownButtonWidth( _pcfd.m_pHelperSrc, _pcfd.m_lParam );
CRect rcClient( _pcfd.m_rcClient );
CRect rcEraser( rcClient );
if( ! bPopupMenuComboFieldMode )
rcEraser.DeflateRect(1,1);
CRect rcHoverFrame( rcEraser );
CRect rcDDButton( rcEraser );
if( _pcfd.m_bRightText )
rcDDButton.right = rcDDButton.left + nDD;
else
rcDDButton.left = rcDDButton.right - nDD;
if( bPopupMenuComboFieldMode )
{
rcDDButton.DeflateRect( 1, 1 );
if( _pcfd.m_bRightText )
rcDDButton.right -= 2;
else
rcDDButton.left += 2;
}
CRect rcClientItem( rcEraser );
rcClientItem.DeflateRect( 1, 1, 3, 1 );
if( _pcfd.m_bRightText )
rcClientItem.left += rcDDButton.Width();
else
rcClientItem.right -= rcDDButton.Width();
if( bPopupMenuComboFieldMode )
rcClientItem.InflateRect(1,1);
CRgn rgnClip, rgnClientItem;
if( (! bPopupMenuComboFieldMode )
&& rgnClip.CreateRectRgnIndirect(&rcClient)
&& rgnClientItem.CreateRectRgnIndirect(&rcClientItem)
&& rgnClip.CombineRgn(
&rgnClip,
&rgnClientItem,
RGN_DIFF
) != ERROR
)
dc.SelectClipRgn( &rgnClip );
if( pWndCombo != NULL )
{
ASSERT_VALID( pWndCombo );
if( ! CExtPaintManagerOffice2003::PaintDockerBkgnd( true, dc, pWndCombo ) )
{
if( rgnClip.GetSafeHandle() != NULL )
dc.SelectClipRgn( NULL );
CExtPaintManagerXP::PaintComboFrame( dc, _pcfd );
return;
}
} // if( pWndCombo != NULL )
COLORREF clrWindow = COLORREF(-1L);
if( pWndCombo != NULL )
clrWindow = pWndCombo->GetBkColor();
if( clrWindow == COLORREF(-1L) )
{
COLORREF clrSysBk =
GetColor(
_pcfd.m_bEnabled ? COLOR_WINDOW : COLOR_3DFACE,
_pcfd.m_pHelperSrc,
_pcfd.m_lParam
);
clrWindow = clrSysBk;
}
if( ! bPopupMenuComboFieldMode )
{
dc.Draw3dRect( rcEraser, clrWindow, clrWindow );
if( _pcfd.m_bRightText )
rcEraser.left += nDD;
else
rcEraser.right -= nDD;
INT nLeftDX = _pcfd.m_bRightText ? 1 : 0;
INT nRightDX = _pcfd.m_bRightText ? 0 : 1;
rcEraser.DeflateRect( _pcfd.m_bRightText ? -1 : 0, 1, _pcfd.m_bRightText ? 0 : -1, 1 );
dc.Draw3dRect( rcEraser, clrWindow, clrWindow );
rcEraser.DeflateRect( 1, 0, 1, 0 );
dc.Draw3dRect( rcEraser, clrWindow, clrWindow );
rcEraser.DeflateRect( nLeftDX, 0, nRightDX, 0 );
dc.Draw3dRect( rcEraser, clrWindow, clrWindow );
rcEraser.DeflateRect( nLeftDX, 0, nRightDX, 0 );
dc.Draw3dRect( rcEraser, clrWindow, clrWindow );
}
// normal=0, hover=1, pressed=2, disabled=3
int nIdx = 3;
if( _pcfd.m_bEnabled )
{
if( _pcfd.m_bPushed )
nIdx = 2;
else if( _pcfd.m_bHover )
nIdx = 1;
else
nIdx = 0;
} // if( _pcfd.m_bEnabled )
CRect rcSrc( 0, 0, m_sizeComboBoxDropDown.cx, m_sizeComboBoxDropDown.cy );
rcSrc.OffsetRect( 0, m_sizeComboBoxDropDown.cy * nIdx );
m_bmpArrComboBoxDropDown.AlphaBlendSkinParts(
dc.m_hDC,
rcDDButton,
rcSrc,
m_rcPaddingComboBoxDropDown,
CExtBitmap::__EDM_STRETCH,
true
);
COLORREF clrBorder = m_arrClrComboBoxBorder[nIdx];
dc.Draw3dRect( rcHoverFrame, clrBorder, clrBorder );
if( (! bPopupMenuComboFieldMode )
&& rgnClip.GetSafeHandle() != NULL
)
dc.SelectClipRgn( NULL );
} Thank you.
|
|
Krustys Donuts
|
Jun 4, 2008 - 10:46 AM
|
I have a CExtTreeGridWnd that has one outer row at the top. Some of these outer cells have text (CExtGridCellHeader) and others have bitmaps (CExtGridCellPictureRef). The problem is that the cells containing the bitmaps are wider than desired. I have used the BestFitRow routine to adjust the height of this top row appropriately and I have been using the ExtentSet method to set the width of the cells. This later method works fine on the cells with text, but seems to have no effect on the cells with bitmaps. I have also tried, with no success, calling BestFitColumn on each of the columns to achieve my goal. Below is my initializtion code, am I missing something??? Thanks, Gil void VRTeachpointGrid::Initialize(bool bRedraw) { if (m_bInitialized) return; m_bInitialized = true; //Enable SiwModifyStyle( __ESIS_STH_PIXEL | __EGBS_SUBTRACT_SEL_AREAS | __ESIS_STV_ITEM | __EGBS_SFB_FULL_ROWS | __EGBS_RESIZING_CELLS_OUTER_H | __EGBS_DYNAMIC_RESIZING | __EGBS_MULTI_AREA_SELECTION | __EGBS_NO_HIDE_SELECTION | __EGBS_GRIDLINES, 0, false); //Disable SiwModifyStyle(0, __EGBS_SFM_ROWS, false); //Enable SiwModifyStyleEx( __EGBS_EX_CELL_TOOLTIPS, 0, false); //Disable SiwModifyStyleEx(0, __EGBS_EX_CELL_EXPANDING_INNER | __EGBS_EX_CELL_EXPANDING | false); //Enable BseModifyStyle( __EGWS_BSE_EDIT_CELLS_INNER | __EGWS_BSE_EDIT_DOUBLE_LCLICK | __EGWS_BSE_EDIT_RETURN_CLICK, 0, false); //Disable BseModifyStyle(0, __EGWS_BSE_EDIT_SINGLE_LCLICK | __EGWS_BSE_EDIT_SINGLE_FOCUSED_ONLY | __EGWS_BSE_EDIT_AUTO | __EGWS_BSE_SORT_COLUMNS_T, false); EnableTooltips(true, true, true, true, true); EnableExpanding(false, false, false, false, false); RemoveAllRows( false ); ColumnRemoveAll( false ); OuterRowCountTopSet( 1L, false ); ColumnAdd( (LONG)m_arGridHdrInfo.size(), false ); //Make the Name column a filter column. CExtGridCellHeaderFilter * pFilterCell = STATIC_DOWNCAST( CExtGridCellHeaderFilter, GridCellGet(kNameCol, 0L, 0, (-1), RUNTIME_CLASS(CExtGridCellHeaderFilter))); pFilterCell->ModifyStyleEx( __EGCS_EX_WRAP_TEXT); pFilterCell->ModifyStyle(__EGCS_SORT_ARROW ); pFilterCell->TextSet( m_arGridHdrInfo[kNameCol].m_strName.c_str() ); pFilterCell->ExtentSet( m_arGridHdrInfo[kNameCol].m_nMinWidth, -1); pFilterCell->ExtentSet( m_arGridHdrInfo[kNameCol].m_nMaxWidth, 1); pFilterCell->ExtentSet( m_arGridHdrInfo[kNameCol].m_nCurWidth, 0); pFilterCell->m_bSortingCommandsEnabled = true; pFilterCell->m_bTextFiltersEnabled = false; pFilterCell->m_bValueFiltersEnabled = false; pFilterCell->m_bDynamicValueFilters = false; CExtBitmap* pBmp = NULL; for (UINT i=kLockedCol; i<m_arGridHdrInfo.size(); i++) { //If this cell has an associated bitmap. if (m_arGridHdrInfo[i].m_pBitmap != NULL) { VRCellPicture* pCell; pCell = STATIC_DOWNCAST(VRCellPicture, GridCellGet(i, 0L, 0, (-1), RUNTIME_CLASS(VRCellPicture))); pCell->BitmapSetBuffer(m_arGridHdrInfo[i].m_pBitmap); pCell->ExtentSet( m_arGridHdrInfo[i].m_nMinWidth, -1); pCell->ExtentSet( m_arGridHdrInfo[i].m_nMaxWidth, 1); pCell->ExtentSet( m_arGridHdrInfo[i].m_nCurWidth, 0); pCell->ImageModeSet( VRCellPicture::eAlign ); pCell->ModifyStyle(__EGCS_TA_HORZ_CENTER | __EGCS_TA_VERT_CENTER); if (m_arGridHdrInfo[i].m_nTooltipId != 0) pCell->SetTooltip(st.GetString(m_arGridHdrInfo[i].m_nTooltipId)); } else //There must be a string associted to this cell. { VRCellHeader* pCell; pCell = STATIC_DOWNCAST(VRCellHeader, GridCellGet(i, 0L, 0, (-1), RUNTIME_CLASS(VRCellHeader))); pCell->ModifyStyleEx( __EGCS_EX_WRAP_TEXT ); pCell->TextSet( m_arGridHdrInfo[i].m_strName.c_str() ); pCell->ExtentSet( m_arGridHdrInfo[i].m_nMinWidth, -1); pCell->ExtentSet( m_arGridHdrInfo[i].m_nMaxWidth, 1); pCell->ExtentSet( m_arGridHdrInfo[i].m_nCurWidth, 0); pCell->ModifyStyle(__EGCS_TA_HORZ_CENTER | __EGCS_TA_VERT_CENTER); if (m_arGridHdrInfo[i].m_nTooltipId != 0) pCell->SetTooltip(st.GetString(m_arGridHdrInfo[i].m_nTooltipId)); } } BestFitRow(0, -1); if (bRedraw) { OnSwUpdateScrollBars(); OnSwDoRedraw(); } }
|
|
Technical Support
|
Jun 6, 2008 - 1:05 PM
|
We cannot say what is wrong without having a test project. We tried to use your code but failed. Because we know nothing about the m_arGridHdrInfo array like how it is declared and initialized. We also don’t know what the VRCellHeader , VRCellPicture and pCell->SetTooltip entities are. Would you create a test project or reproduce the problem in one of our samples, i.e. FilteredGrids and send it to us?
|
|
Kevin Murray
|
Jun 3, 2008 - 1:45 PM
|
We have a dynamic control bar that contains an ActiveX control. When docked/auto-hide and we size the bar, MFC throws an exception. Now to see this, you’d have to debug with all exceptions being monitored, because MFC catches the exception in a try/catch block of code. The exception appears to be triggered by a Prof-UIS call to GetStyle for the ActiveX control, with MFC exclaiming that such a function shouldn’t be used for an ActiveX control (or something similar). Is there any way to embed the ActiveX in the dynamic control bar to avoid this exception occuring? Kevin Murray AGI
|
|
Technical Support
|
Jun 5, 2008 - 4:51 AM
|
The CExtControlBar /CExtDynamicControlBar windows can be used as parent windows for COM controls and we know many real life customer projects which prove this. But some controls may need persistent OLE control containers. A control bar temporarily moves its child window into a auto-hidden window displayed from the auto-hide tabs and some COM controls may not like this. You can create your COM control as a child of some dialog window and insert this dialog window into a control bar.
|
|
howard liu
|
Jun 3, 2008 - 8:00 AM
|
Hi, I am trying to apply prof-UI to CPropertysheet. Is there a prof-ui method equivalent to addpage( ) in mfc that will enable one to add new pages being in CExtResizableProprtysheet so that the newly added page can be colored Thankls Howard
|
|
Technical Support
|
Jun 4, 2008 - 4:40 AM
|
The CExtResizablePropertySheet class in Prof-UIS is derived from the MFC’s CPropertySheet . That means that all methods of the CPropertySheet class are available in CExtResizablePropertySheet .
|
|
howard liu
|
Jun 3, 2008 - 7:26 AM
|
Hi, I have a status bar (a static bar) located between the tool bar and the list ctrl in the user interface of my application. This status bar is like the title bar for the list ctrl that exists below that. This status bar is different from the parent status bar that exists below in the framework and so I call this a non parent status bar. I encounter two problems with this status bar Problem -1 ) When I right click on the tool bar ( that exists on top of this status bar) and disable that tool bar, the list ctrl moves up. But the status bar remains its position. The status bar does not move in a coordinated way with the list ctrl Problem - 2) when I resize( using the grippers at the right bottom corner) the user interface, all the control within resize. But this status bar does not resize in a coordinated way Thanks Howard
|
|
Technical Support
|
Jun 4, 2008 - 4:48 AM
|
We are sorry but it is hardly possible to say what’s wrong without seeing the source code. Could you create a stripped version of your project with the UI code only and send it to us?
|
|
Thomas Maurer
|
Jun 3, 2008 - 5:35 AM
|
Hello I am using V2.54 of ProfUis. My application can be used as an embedded application in Internet Explorer. The communication between the OLE Container (IE) and the OLE server (my app) seems to work a little differently from the "normal" scenario. The following image (please remove "removeme" from the URL) shows my scenario: http://download.ierax.removeme.ch/focusproblem.jpg#@lt;/p>
The red circle shows a button that opens a menu. The green circle shows a combo box. When you open the menu and click into the caption of the Internet Explorer the menu remains open. If you drop down the combo box and you click into the caption of the Internet Explorer the combo box closes. I could live with that but if you close the Internet Explorer by pressing the "X" box while the red circled menu is still open my application crashes at the following call stack: > ProfUIS254ud.dll!CExtPopupMenuWnd::PassMsgLoop(bool bEnableOnIdleCalls=false) Line 8192 + 0xb bytes C++
ProfUIS254ud.dll!CExtPopupMenuSite::_Done() Line 586 + 0xc bytes C++
ProfUIS254ud.dll!CExtPopupMenuSite::~CExtPopupMenuSite() Line 431 C++
ProfUIS254ud.dll!`dynamic atexit destructor for ’CExtPopupMenuSite::g_DefPopupMenuSite’’() + 0xd bytes C++
ProfUIS254ud.dll!_CRT_INIT(void * hDllHandle=0x00760000, unsigned long dwReason=0, void * lpreserved=0x00000001) Line 417 C
ProfUIS254ud.dll!__DllMainCRTStartup(void * hDllHandle=0x00760000, unsigned long dwReason=0, void * lpreserved=0x00000001) Line 509 + 0x11 bytes C
ProfUIS254ud.dll!_DllMainCRTStartup(void * hDllHandle=0x00760000, unsigned long dwReason=0, void * lpreserved=0x00000001) Line 459 + 0x11 bytes C
NTDLL.DLL!7788806c()
[Frames below may be incorrect and/or missing, no symbols loaded for NTDLL.DLL]
NTDLL.DLL!7788a980()
KERNEL32.DLL!77e994c1()
KERNEL32.DLL!77e96a5b()
NTDLL.DLL!778ac166()
KERNEL32.DLL!77e78280()
KERNEL32.DLL!77e90c5b()
NTDLL.DLL!7788740d()
KERNEL32.DLL!77e90cf2()
KERNEL32.DLL!77e90b91()
msvcr80d.dll!__crtExitProcess(int status=0) Line 684 C
msvcr80d.dll!doexit(int code=0, int quick=0, int retcaller=0) Line 596 + 0x9 bytes C
msvcr80d.dll!exit(int code=0) Line 398 + 0xd bytes C
cpView.exe!__tmainCRTStartup() Line 599 C
cpView.exe!wWinMainCRTStartup() Line 403 C
KERNEL32.DLL!77e989d5() in the statement at line 8192: // Process all the messages in the message queue
while( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) )
{
if( !AfxGetThread()->PumpMessage() ) <<<======= IT CRASHES HERE ===================
{
PostQuitMessage(0);
return;
} // if( !AfxGetThread()->PumpMessage() )
} // while( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) I assume that there is no thread anymore because this call comes very late and the MFC might already be shut down. - Can I fix this somehow without changing the source? - If I do have to fix the source I would prefer a solution that would close the menu - If that can not be done I guess I would have to check the result of AfxGetThread if is NULL Thanks for your help. Thomas
|
|
Thomas Maurer
|
Jun 4, 2008 - 6:35 AM
|
Thank you very much. It works now. I have put CancelMenuTracking into CWinApp::ExitInstance which is too late and causes another assertion but putting it into the WM_DESTROY handler of the main frame works fine. It looks a little strange when the application has gone but the menu is still visible before it is closed as the very last window but I can live with that..
Thanks again
Thomas
|
|
Technical Support
|
Jun 5, 2008 - 4:07 AM
|
The CExtPopupMenuWnd::CancelMenuTracking() destroys the currently opened popup menu windows. This action should be linked to the destruction event of the main window in a ActiveX project or EXE project. You did this right. The IE server does not broadcast messages like WM_CANCELMODE to any windows before it releases some COM controls and this is the real source of the problem.
It’s absolutely not difficult to generate the following "DLL hell" like kind of problem: the window procedure or handler methods of some window are implemented in some DLL and invoked but the DLL is already unloaded.
|
|
Technical Support
|
Jun 4, 2008 - 4:50 AM
|
The following situation is potentially possible:
1) A Prof-UIS popup menu is displayed on the screen. 2) IE becomes closed and your control is destroyed. 3) It’s even possible your DLL and Prof-UIS DLLs are unloaded before WM_DESTROY messages are delivered to the open popup menu windows.
You can invoke the CExtPopupMenuWnd::CancelMenuTracking() static method when your COM control is destroyed.
|
|
Pierre MEDART
|
Jun 3, 2008 - 2:01 AM
|
We use the TabMdi with the VS2005 style in our multi-doc application. We can we get rid of the Frame while creating the view, I mean it first appears and then is showed as maximized, we can see the transition. The rendering on screen is not good. We’d like to have it as in the ProfStudio sample
|
|
Technical Support
|
Jun 5, 2008 - 4:52 AM
|
Centuries? Definitively no. Weeks and months? Hardly possible. We can release it right now, but several issues remain. We would prefer to fix every known issue. We can provide you with 2.83 beta right now.
|
|
Technical Support
|
Jun 4, 2008 - 4:53 AM
|
We know that this situation is possible when you are using the paint managers which provide CExtNCW -based windows with skinned window non-client area. The CExtNCW template class was re-coded in v.2.83 so the problem should be gone. We can provide you with the source code update.
|
|
Pierre MEDART
|
Jun 4, 2008 - 6:20 AM
|
Dear technical support, When the 2.83 release will be available ? Few weeeks, months, years, centuries ;-) Regards, Pierre
|
|
Pierre MEDART
|
Jun 3, 2008 - 1:52 AM
|
I could reproduce the issue with your code samples (for example the MDI). Have a MDI app maximized. Click on ShowDesktop or press Win + D On the window bar, click on the Minimized appliction It reappers as not maximized.
|
|
Technical Support
|
Jun 4, 2008 - 4:51 AM
|
This is already fixed. We can provide you with the source code update.
|
|
Offer Har
|
Jun 2, 2008 - 12:45 PM
|
I have added close button to tab control, but it comes out touching the tab frame: And again, blown up: Can it be moved pixel or two to the left? Thanks, Ron.
|
|
Technical Support
|
Jun 17, 2008 - 3:50 AM
|
We have just fixed this. If you need the updated files, please contact us via email.
|
|
Offer Har
|
Jun 17, 2008 - 8:36 AM
|
Is this fix for 2.83 or 2.84?
|
|
Technical Support
|
Jun 20, 2008 - 4:36 AM
|
|
|
Offer Har
|
Jun 20, 2008 - 6:21 AM
|
I’m sorry, but this bug is still there in 2.83 official release, please fix:
|
|
Offer Har
|
Jun 20, 2008 - 6:23 AM
|
I see.... I need code change for this... OK....
|
|
Offer Har
|
Jun 16, 2008 - 10:27 AM
|
I see that this problem is not fixed in 2.83 Please fix it... it does not look good. Thanks, Ron.
|
|
Offer Har
|
Jun 2, 2008 - 12:40 PM
|
The arrow looks fine when not pressed: But when pressed, the arrow disappear:
|
|
Technical Support
|
Jun 6, 2008 - 1:03 PM
|
We fixed this bug. Thank you. Please update the following method: void CExtPaintManagerOffice2007_R2_Obsidian::PaintTabButton(
CDC & dc,
CRect & rcButton,
LONG nHitTest,
bool bTopLeft,
bool bHorz,
bool bEnabled,
bool bHover,
bool bPushed,
bool bGroupedMode,
CObject * pHelperSrc,
LPARAM lParam, // = 0L
bool bFlat // = false
)
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
if( IsHighContrast() )
{
CExtPaintManagerXP::PaintTabButton(
dc,
rcButton,
nHitTest,
bTopLeft,
bHorz,
bEnabled,
bHover,
bPushed,
bGroupedMode,
pHelperSrc,
lParam,
bFlat
);
return;
}
COLORREF clrGlyph = RGB(141,141,141);
if( bEnabled )
{
if( pHelperSrc != NULL
&& pHelperSrc->IsKindOf(RUNTIME_CLASS(CExtPopupMenuWnd))
)
clrGlyph = RGB(0,0,0);
else
clrGlyph = RGB(255,255,255);
}
COLORREF clrTL =
GetColor(
bPushed
? COLOR_3DDKSHADOW
: COLOR_3DHILIGHT
,
pHelperSrc,
lParam
);
COLORREF clrBR =
GetColor(
bPushed
? COLOR_3DHILIGHT
: COLOR_3DDKSHADOW
,
pHelperSrc,
lParam
);
CExtPaintManager::stat_PaintTabButtonImpl(
dc,
rcButton,
nHitTest,
bTopLeft,
bHorz,
bEnabled,
bHover,
bPushed,
bGroupedMode,
clrGlyph,
clrTL,
clrBR,
bFlat
);
}
|
|
Offer Har
|
Jun 2, 2008 - 7:57 AM
|
Tried this:
m_wndMdiTabs.ModifyTabWndStyleEx(__ETWS_EX_CLOSE_ON_TABS);
Is this not supported? If not, can you please add this to your todo list - this is a very good feature.
Thanks,
Ron.
|
|
Technical Support
|
Jun 2, 2008 - 11:56 AM
|
In the DRAWCLI sample, the Close button is available in each tab item in its MDI tab window. So you can check this.
|
|
R M
|
Jun 2, 2008 - 5:04 AM
|
Dear Support,
Hovering over the items of a context menu, context help will be shown in the parent windows status bar. How to suppress the access to the status bar?
The menu is constructed menu by using an existing CMenu pointer:
OnContextMenu (CWnd* pWnd, CPoint point)
{
...
CMenu menu;
VERIFY( menu.LoadMenu(nRsrcID));
HWND hWnd = pWnd->GetSafeHwnd();
ASSERT( hWnd != NULL );
ASSERT( ::IsWindow( hWnd ) );
CExtPopupMenuWnd * pPopupMenu = new CExtPopupMenuWnd;
VERIFY( pPopupMenu->UpdateFromMenu( hWnd , &menu ) );
if( !pPopupMenu->TrackPopupMenu(TPMX_OWNERDRAW_FIXED|TPMX_HIDE_KEYBOARD_ACCELERATORS,
point.x, point.y ))
{
...
}
....
}
Thanks in advance
RM
|
|
Technical Support
|
Jun 2, 2008 - 11:55 AM
|
The CExtPopupMenuWnd popup menu in Prof-UIS works in the same way as MFC menus. If the status tip is specified for menu command items, it’s displayed in the message pane of the status bar. The status pane with identifier equal to zero is called "message pane" and both toolbars and menus in both Prof-UIS and MFC change text of the message pane automatically. You can use a popup menu with command items which have no status tip texts specified in resources. Or, you can use a status bar without any message pane.
|
|
Raha Mohtasham
|
Jun 2, 2008 - 2:53 AM
|
Dear Support,
Creating a tab page in CExtTabPageContainerOneNoteWnd, clrBkLight and clrBkDark parameters can be passed to the PageInsert method.
How to change the colors of a selected Tab at runtime?
Thx.
RM
|
|
Technical Support
|
Jun 2, 2008 - 11:51 AM
|
You can implement the CExtTabOneNoteWnd::OnTabWndDrawItem() virtual method in your CExtTabOneNoteWnd -derived class. Your method should be similar to the original one except the stat_OnTabWndDrawItemOneNoteImpl() method should be called with preferred colors.
|
|
Raha Mohtasham
|
May 30, 2008 - 2:40 AM
|
Dear Support, Changing the windows display settings from 96 DPI to 120 DPI destroys the appearance of the Icons. They get stretched. How to avoid it? See the Toolbox Icons (Simple Controls, Win32 Controls sections) in the FormEditor Sample. (FormEditor --> View --> ToolBox) Greetings RM
|
|
Technical Support
|
May 31, 2008 - 10:43 AM
|
Please invoke the following code during your application startup: g_PaintManager.m_bEnableUiScalingX = g_PaintManager.m_bEnableUiScalingY = g_PaintManager.m_bEnableUiScalingZ = false;
|
|
tera t
|
May 29, 2008 - 8:23 PM
|
Hello. In a standard setting dialog of Prof-UIS
There is the thing that character font is small.
Because a font is small , It is hard to see it.
|
|
Technical Support
|
May 31, 2008 - 10:41 AM
|
You can explicitly specify a larger font in Japanese dialog template resources. But the caption font will be same as in other desktop windows.
|
|
tera t
|
Jun 1, 2008 - 7:44 PM
|
Hello. I revised a resource.
However, the font size inside the tab is not changed. ------------------------------------------------------
IDD_EXT_CUST_PAGE_KEYBOARD DIALOGEX 0, 0, 300, 140
STYLE WS_CHILD | WS_VISIBLE
FONT 12, "MS Sans Serif", 0, 0, 0x1
------------------------------------------------------ Because it is a troublesome problem.
I withdraw this problem. Thanks,
|
|
tera t
|
May 29, 2008 - 8:33 PM
|
I can confirm it for sight.
However, it is dissatisfaction slightly.
|
|