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 |
|
Kazutaka Era
|
Nov 1, 2007 - 1:46 AM
|
Dear ProfUIS Support Team,
I need support for an issue with the CExtTreeGridWnd treeview control.
I have created a docked treeview control class in an MDI application.
It is used in MainFrm.h/cpp as a class member (Not Inherited).
If I use the standard MFC CTreeCtrl class, the tree items display just fine.
If I use the CExtTreeGridWnd class, the tree items do not display at all.(No visible text).
The CExtTreeGridWnd member I created is accepting the items I add,
and I can get a valid CExtGridCellString* pointer to set an item’s text.
I have checked the "test_tree_grid_idea" sample project located on the ProfUIS website,
I have to create the tree differently from what is found in "int CChildView::OnCreate(LPCREATESTRUCT lpCreateStruct) "
because my tree is a class member (Not inherited like it is in the "test_tree_grid_idea" sample).
I tried using most of the initialization code found in "void CChildView::PreSubclassWindow() "
with the exception of the "CExtTreeGridWnd::PreSubclassWindow();" function call.
I also tried using the intialization code from the "FormEditor" sample,
but still can’t get the items to display. The docking works great though.
Also, I used the "MDIDOCVIEW" sample to make my docked controls,
but the push-pin doesn’t display on them. Only an X for closing the control is visible.
I would like to know how to add the push-pin for auto-hide support.
Hope to hear from you soon.
|
|
Technical Support
|
Nov 1, 2007 - 12:31 PM
|
Could you send us your project so we can find out what is wrong?
|
|
Paul Cowan
|
Oct 31, 2007 - 1:48 PM
|
How do I change the pop-up menu for a grid text cell? The menu that appears has an Erase option, which I need to change. I’ve look in all the source and can’t find this menu.
|
|
Technical Support
|
Nov 1, 2007 - 1:14 PM
|
This menu comes from the CExtEditBase class which is base for the CExtGridInplaceEdit cell inplace editor. See the CExtEditBase::OnContextMenu() method. What do you mean by changing, the menu item’s text or item action?
|
|
Xavier Caroff
|
Oct 31, 2007 - 11:30 AM
|
Hello,
We have a multi-window application. We can load in a frame different types of document, and the menu is modified dynamically according to the document loaded.
The problem is when we change dynamically a menu command (just the label), all the opening frame are impacted.
All the frames of the application are derived to CExtNCW. In the fonction "OnCreate" we use the fonction "ProfileSetup" with the same name of profile.
For the dynamic modification of the menu we use :
CExtCmdItem* l_P_O_item = g_CmdManager->CmdGetPtr(F_getProfileName(), ID_VIEW_LAYER0);
if (l_P_O_item != NULL) { l_P_O_item->m_sMenuText = l_O_texte; }
Have you a solution for us?
Best Regards,
Renaud Ixsea
|
|
Technical Support
|
Nov 1, 2007 - 8:37 AM
|
Your message contains an answer to your question. Both menus and toolbars are based on command descriptions in the command manager. I.e. menu items do not have text and get it from CExtCmdItem objects stored in the command manager. But you created several windows with their menus and attached all of them to the same command profile in the command manager. As a result, menu items with the same identifier in different windows have the same text. You should make all your windows using different command profiles at runtime. You can even create and initialize them by using the command profile with one statically known name and then rename the command profile using the CExtCmdManager::ProfileRename() API. When some window is destroyed, it can rename the command profile back to the statically known name. As a result, all the windows will load/save one command profile, but will use different command profiles at run time.
|
|
tera t
|
Oct 31, 2007 - 2:34 AM
|
Hello.
I installed a button in an outer. http://www.yukai.jp/~ifreeta/20071031/WS3.jpg
However, mouse cursor changes at a boundary line.
Cannot you invalidate these functions? But __EGBS_SF_SELECT_OUTER_ROWS of the availability want to keep on.
|
|
Technical Support
|
Nov 1, 2007 - 8:32 AM
|
Could you run the SimpleGrids sample and look at the grid window on the Order Details tab page? This window supports vertical resizing of rows and row selection by clicking header cells. Both resizing and selection cursors are displayed correctly. So just compare the initialization of your grid window with this one. We believe the problem may be that some styles are used incorrectly.
|
|
tera t
|
Oct 31, 2007 - 2:10 AM
|
|
|
Technical Support
|
Nov 1, 2007 - 8:34 AM
|
The following class implements a grid window which can lock focus and selection changing and does this when the user clicks on the built-in cell’s check boxes: class CYourGridWnd : public CExtGridWnd
{
public:
bool m_bLockSelectionSetting:1, m_bLockFocusSetting:1;
CYourGridWnd()
: m_bLockSelectionSetting( false )
, m_bLockFocusSetting( false )
{
}
virtual CPoint FocusSet(
const POINT & ptNewFocus,
bool bEnsureVisibleColumn = true,
bool bEnsureVisibleRow = true,
bool bResetSelectionToFocus = true,
bool bRedraw = true,
bool * p_bCanceled = NULL
)
{
ASSERT_VALID( this );
if( m_bLockFocusSetting )
return FocusGet();
return CExtGridWnd::FocusSet( ptNewFocus, bEnsureVisibleColumn, bEnsureVisibleRow, bResetSelectionToFocus, bRedraw, p_bCanceled );
}
virtual bool SelectionSet(
const RECT & rcNewSelection,
bool bReplaceOldAreas = true,
bool bReplaceLastArea = false,
bool bRedraw = true
)
{
ASSERT_VALID( this );
if( m_bLockSelectionSetting )
return true;
return CExtGridWnd::SelectionSet( rcNewSelection, bReplaceOldAreas, bReplaceLastArea, bRedraw );
}
virtual bool OnGbwAnalyzeCellMouseClickEvent(
UINT nChar, // VK_LBUTTON, VK_RBUTTON or VK_MBUTTON only
UINT nRepCnt, // 0 - button up, 1 - single click, 2 - double click, 3 - post single click & begin editing
UINT nFlags, // mouse event flags
CPoint point // mouse pointer in client coordinates
)
{
ASSERT_VALID( this );
CExtGridHitTestInfo htInfo( point );
HitTest( htInfo, false, true );
if( (! htInfo.IsHoverEmpty() )
&& htInfo.IsValidRect()
&& ( htInfo.m_dwAreaFlags & __EGBWA_CELL_CHECKBOX ) != 0
)
m_bLockFocusSetting = m_bLockSelectionSetting = true;
bool bRetVal = CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent( nChar, nRepCnt, nFlags, point );
m_bLockFocusSetting = m_bLockSelectionSetting = false;
return bRetVal;
}
};
|
|
tera t
|
Nov 1, 2007 - 6:37 PM
|
|
|
Offer Har
|
Oct 30, 2007 - 2:43 PM
|
Dear Support,
I’m waiting for a loooooooooooooooooooooooooooooooooooooooong time for this tutorial. Can you please give me some updated estimation, as we do need to finish this task ASP.
Also, the grid tool-tip excel style was supposed to be ready months ago.... what is going on?
Ron.
|
|
Pawel Kalinowski
|
Oct 30, 2007 - 3:29 AM
|
Hi!
Just noticed that if you click in the "empty" area of a scrollbar to cause a scroll, it’ll only happen when the scroller is small enough to scroll in more than 1 steps - that is, the content will not be refreshed unless the scrolling is done in more than 1 step. It’s easily noticeable in the ZoomScrollBar demo. Resize the window so that the scroller appears and there’s only a small offset to scroll, then click in the "empty" space in the scrollbar.
Please post a fix asap!
Regards.
|
|
Technical Support
|
Nov 12, 2007 - 6:34 AM
|
We did some refactoring of the scroll bar’s mouse processing algorithm. Please request the updated source code at support@prof-uis.com.
|
|
Bangjun Lei
|
Oct 30, 2007 - 2:56 AM
|
Dear Sir./Madam.,
I found out that my view derived from CScrollView in the MDI application is not skinned (mainly the titlebar and the scroll bars). What should I do to make it skinned? Probably you ask me to take a look at drawcli. But what are essential to do?
Thanks!
|
|
Technical Support
|
Nov 12, 2007 - 6:48 AM
|
The scrollable view window in the DRAWCLI sample is based on the CExtSplitterWnd class which creates and uses skinned CExtScrollBar windows. But in your CScrollView -derived class, it is non-client areas that look like scroll bars. They are not related to skinned Prof-UIS scroll bars. You can also switch to using a skinned splitter window, make your scroll view using Prof-UIS scroll bars or switch to using Prof-UIS based scrollable windows (CExtScrollWnd ) with skinned Prof-UIS scroll bars.
|
|
Christophe Guibert
|
Oct 29, 2007 - 11:53 AM
|
Dear Support Team,
When using long strings of text in CExtLabel controls, the text is not wrapped any more as it used to be with previous Prof-UIS versions.
Assuming there’s enough vertical space for multine label in the control, the text should be wrapped without adding \n characters in it, shouldn’t it ?
Is this on purpose ? How to revert to previous behavior ?
Best Regards,
Christophe guibert
|
|
Technical Support
|
Nov 1, 2007 - 12:53 PM
|
Yes, you are right. This is a bug. Thank you. Please update the following method: void CExtLabel::DoPaint(
CDC * pDC,
CRect & rcClient
)
{
ASSERT_VALID( this );
ASSERT_VALID( pDC );
CExtMemoryDC dc(
pDC,
&rcClient
);
CRgn rgnClient;
if( rgnClient.CreateRectRgnIndirect( &rcClient ) )
dc.SelectClipRgn( &rgnClient );
OnEraseBackground( dc, rcClient );
DWORD dwWndStyle = GetStyle();
DWORD dwWndType = (dwWndStyle&SS_TYPEMASK);
bool bCenterImage = ( (dwWndStyle&SS_CENTERIMAGE) != 0 );
if( ! m_bmp.IsEmpty() )
{
bool bSmootherAsPossible = true;
if( m_eImageMode == eStretch )
{
m_bmp.AlphaBlendSkinParts(
dc.GetSafeHdc(),
rcClient,
CRect(0,0,0,0),
CExtBitmap::__EDM_STRETCH,
true,
bSmootherAsPossible
);
}
else if( m_eImageMode == eTile )
{
m_bmp.AlphaBlendSkinParts(
dc.GetSafeHdc(),
rcClient,
CRect(0,0,0,0),
CExtBitmap::__EDM_TILE,
true,
bSmootherAsPossible
);
}
else if( m_eImageMode == eAlign )
{
CSize szSize = m_bmp.GetSize();
CRect rcDst(
rcClient.left,
rcClient.top,
rcClient.left + szSize.cx,
rcClient.top + szSize.cy
);
switch( dwWndType )
{
case SS_RIGHT:
rcDst.OffsetRect( rcClient.right - rcDst.right, 0 );
break;
case SS_CENTER:
rcDst.OffsetRect( ( (rcClient.right - rcClient.left) - (rcDst.right - rcDst.left) ) / 2, 0 );
break;
default:
// all the other types assumed as left
break;
}
CRect rcSrc( 0, 0, szSize.cx, szSize.cy );
rcDst.top = max( rcDst.top, rcClient.top );
rcDst.left = max( rcDst.left, rcClient.left );
rcDst.bottom = min( rcDst.bottom, rcClient.bottom );
rcDst.right = min( rcDst.right, rcClient.right );
if( ::RectVisible( dc.GetSafeHdc(), &rcDst ) )
{
INT nOldStretchBltMode =
bSmootherAsPossible
? ( ::GetStretchBltMode( dc.m_hDC ) )
: ( COLORONCOLOR )
;
if( bSmootherAsPossible )
::SetStretchBltMode(
dc.m_hDC,
( g_PaintManager.m_bIsWinNT )
? HALFTONE
: COLORONCOLOR
);
m_bmp.AlphaBlend(
dc.m_hDC,
rcDst,
rcSrc
);
if( bSmootherAsPossible )
::SetStretchBltMode(
dc.m_hDC,
nOldStretchBltMode
);
}
}
}
else if( dwWndType == SS_ICON )
{
HICON hIcon = GetIcon();
if( hIcon != NULL )
{
CExtCmdIcon _icon;
_icon.AssignFromHICON( hIcon, true );
CSize szIcon = _icon.GetSize();
int nOffsetX = bCenterImage ? (rcClient.Width() - szIcon.cx) / 2 : 0;
int nOffsetY = bCenterImage ? (rcClient.Height() - szIcon.cy) / 2 : 0;
_icon.Paint(
PmBridge_GetPM(),
dc.GetSafeHdc(),
rcClient.left + nOffsetX,
rcClient.top + nOffsetY,
-1,
-1
);
}
}
else
{
CExtSafeString strText;
int nTextLen = GetWindowTextLength();
if( nTextLen > 0 )
{
GetWindowText( strText.GetBuffer( nTextLen + 2 ), nTextLen + 1 );
strText.ReleaseBuffer();
}
if( strText.GetLength() > 0 )
{
DWORD dwDrawTextFlags = 0;
switch( dwWndType )
{
case SS_RIGHT:
dwDrawTextFlags = DT_RIGHT;
break;
case SS_CENTER:
dwDrawTextFlags = DT_CENTER;
break;
case SS_LEFTNOWORDWRAP:
dwDrawTextFlags = DT_LEFT;
break;
default:
// all the other types assumed as left
dwDrawTextFlags = DT_LEFT;
break;
} // switch( dwWndType )
// do tabs expanding
if( strText.Find( _T(’\t’) ) != -1 )
dwDrawTextFlags |= DT_EXPANDTABS;
if( (dwWndType == SS_SIMPLE)
|| (dwWndStyle&SS_CENTERIMAGE) != 0
|| (dwWndStyle&SS_ENDELLIPSIS) != 0
|| (dwWndStyle&SS_PATHELLIPSIS) != 0
)
{
dwDrawTextFlags |= DT_SINGLELINE;
if( (dwWndStyle&SS_CENTERIMAGE) != 0 )
dwDrawTextFlags |= DT_VCENTER;
if( (dwWndStyle&SS_ENDELLIPSIS) != 0 )
dwDrawTextFlags |= DT_END_ELLIPSIS;
if( (dwWndStyle&SS_PATHELLIPSIS) != 0 )
dwDrawTextFlags |= DT_PATH_ELLIPSIS;
}
else
{
dwDrawTextFlags |= DT_WORDBREAK;
}
if( dwWndType == SS_LEFTNOWORDWRAP )
dwDrawTextFlags &= ~(DT_WORDBREAK|DT_SINGLELINE);
if( (dwWndStyle&SS_NOPREFIX) != 0 )
dwDrawTextFlags |= DT_NOPREFIX;
bool bEnabled = IsWindowEnabled() ? true : false;
OnDrawLabelText(
dc,
rcClient,
strText,
dwDrawTextFlags,
bEnabled
);
} // if( strText.GetLength() > 0 )
}
PmBridge_GetPM()->OnPaintSessionComplete( this );
if( rgnClient.GetSafeHandle() != NULL )
dc.SelectClipRgn( &rgnClient );
}
|
|
Christophe Guibert
|
Nov 8, 2007 - 2:37 PM
|
Hello,
Sorry for this late answer, I did not have the opportunity to integrate your fix earlier : thank you, it fixes all the CExtLabel that were encountered in the 2.81 Prof-UIS version.
Best Regards,
Christophe Guibert
|
|
Suhai Gyorgy
|
Oct 29, 2007 - 12:42 PM
|
This has been discussed in a thread not so long ago. The solution: Change CExtLabel.cpp @ line 238:
It is now: bool bForceSingleLine = ( strText.Find( _T("\n") ) >= 0 ) ? true : false;
It should be: bool bForceSingleLine = ( strText.Find( _T("\n") ) >= 0 ) ? false : true;
|
|
Christophe Guibert
|
Oct 29, 2007 - 2:03 PM
|
I thank you for this answer, but it solves another problem, where \n characters were not properly managed.
In this case, it is slightly different : there are no \n characters in the string and the text should be wrapped when there’s enough room in the control height :
Behavior for long strings with Prof-UIS 2.80 CExtLabel for long strings (WITHOUT any \n chars)
-------------------------------------------
|a string of text that is much longer than|
|the control width, but can be wrapped |
|when there’s enough height. |
-------------------------------------------
New behavior for Prof-UIS 2.81 CExtLabel
-------------------------------------------
|a string of text that is much longer than|
| |
| |
-------------------------------------------
Best Regards,
Christophe Guibert
|
|
Christophe Guibert
|
Oct 29, 2007 - 3:11 PM
|
In fact I think that the correction (in CExtLabel::DoPaint())
bool bForceSingleLine =
( strText.Find( _T("\n") ) >= 0 ) ? false : true;
is wrong and it prevents any wrapping of text. It’s not because there are no \n in the string that the text should not be wrapped. Further we find :
if( bForceSingleLine
|| dwWndType == SS_LEFTNOWORDWRAP
|| (dwWndStyle&SS_ENDELLIPSIS) != 0
|| (dwWndStyle&SS_PATHELLIPSIS) != 0
)
{
dwDrawTextFlags |= DT_SINGLELINE;
if( (dwWndStyle&SS_ENDELLIPSIS) != 0 )
dwDrawTextFlags |= DT_END_ELLIPSIS;
if( (dwWndStyle&SS_PATHELLIPSIS) != 0 )
dwDrawTextFlags |= DT_PATH_ELLIPSIS;
}
else
{
dwDrawTextFlags |= DT_WORDBREAK;
}
So there’s no chance to use the default DT_WORDBREAK when there’s no \n in the string ! The logics with the bForceSingleLine (when true) seems to be abusive.
Best Regards,
Christophe Guibert
|
|
Christophe Guibert
|
Oct 29, 2007 - 3:02 PM
|
in fact I think that the correction <code><pre> bool bForceSingleLine = ( strText.Find( _T("\n") ) >= 0 ) ? false : true;
|
|
Paul Cowan
|
Oct 29, 2007 - 10:09 AM
|
I have a report grid with editable cells. I need to be able to select cells within a column. Using __EGBS_LBEXT_SELECTION I can select multi rows, but that selectes the entire row. I want to be able to select one column in the rows. ie click on cell in row 2, column 3 and drag down to row 5 column 3 and have 4 cells in column 3 selected.
|
|
Suhai Gyorgy
|
Oct 29, 2007 - 6:05 AM
|
Dear Support,
We’d like to use your CExtEdit class for one of our controls, which would be disabled. But the originally used disabled color seems to be a bit dark, so we’d like to lighten it. I see that this color is set in CExtEditBase::CtlColor . How could we achieve our requirement without copying any code from this method? I see that m_clrBackPrev variable holds the current background color, so I’ve tried this: COLORREF CMyEdit::OnQueryBackColor() const
{
COLORREF clrOrig = CExtEdit::OnQueryBackColor();
if( clrOrig == COLORREF(-1L) && m_clrBackPrev != COLORREF(-1L) )
clrOrig = RGB((GetRValue(m_clrBackPrev)+255)/2, (GetGValue(m_clrBackPrev)+255)/2, (GetBValue(m_clrBackPrev)+255)/2);
return clrOrig;
}
But it doesn’t work good: as soon as I hover over the editbox, it turns white and stays like that forever. The class needs to be reusable, so it should work exactly like your class except for the disabled background color. And we’d really like to avoid copying codes from your source, as that would require constant checkup with every upgrade. Could you please point me to the right direction? Thank you! Chris
|
|
Technical Support
|
Oct 29, 2007 - 1:04 PM
|
Would you send us a screenshot that illustrates the issue?
|
|
Suhai Gyorgy
|
Oct 30, 2007 - 3:04 AM
|
I’ve sent the screenshot in e-mail.
|
|
Technical Support
|
Oct 29, 2007 - 10:28 AM
|
You can achieve this by overriding the OnQueryBackColor() method in this way COLORREF OnQueryBackColor() const
{
COLORREF clrOrig = CExtEdit::OnQueryBackColor();
if( clrOrig == COLORREF(-1L) )
{
bool bReadOnly = (GetStyle()&ES_READONLY) != 0 ? true : false;
bool bDisabled = OnQueryWindowEnabledState() ? false : true;
COLORREF clrSysBk =
PmBridge_GetPM()->GetColor(
( bReadOnly || bDisabled )
? COLOR_3DFACE
: COLOR_WINDOW,
(CObject*)this
);
clrOrig =
RGB(
(GetRValue(clrSysBk) + 255) / 2,
(GetGValue(clrSysBk) + 255) / 2,
(GetBValue(clrSysBk) + 255) / 2
);
}
return clrOrig;
}
|
|
Suhai Gyorgy
|
Oct 29, 2007 - 10:43 AM
|
Using this code removes the white border which would appear when the editbox does not have the focus and the mouse does not hover over the control. How could I get that back? Thank you!
|
|
Daniel Dupre
|
Oct 28, 2007 - 4:57 PM
|
I have a floating window that I use for preview in a video editing application, therefore I need to maintain an aspect while resizing the preview bar, ie (4:3, 16:9). Previously I was using a CDialogBar derived class attached to the mainframe that would handel the CalcDynamicLayout(int nLength, DWORD dwMode), which I would use to get the direction of resizing and formulate the size to maintain the aspect on sizing. I switched this over to a CExtControlBar derived class, but the dwMode coming in always equals 6. Is there any way to implement the behaviour I need?
|
|
Technical Support
|
Oct 29, 2007 - 10:27 AM
|
All control bars in Prof-UIS are based on CExtControlBar . There are two types of control bars which behave in an absolutely different way in Prof-UIS.
1) Resizable control bars (CExtControlBar ), which are designed to be similar to resizable panels in Visual Studio .NET and Visual Studio 2005. These control bars are designed to be fully resizable without any restriction. We can implement some restriction on its size for these control bars but only in particular cases. But two resizable control bars with such a restriction may conflict with each other when they both are docked into one tabbed group or one row/column of control bars. So it’s not a good idea to restrict the size of these control bars. The CControlBar::CalcDynamicLayout() virtual method is used differently for resizable control bars in comparision with MFC control bars. If you decide to use a resizable control bar as a video player container, you should put the video player into scrollable container as it is demonstrated in the following sample application.
2) Fixed-size control bars, which are very close to MFC control bars. The fixed-size control bars can be non-resizable at all or resizable with some rules and restrictions. The CExtToolControlBar and CExtPanelControlBar classes are kind of fixed-size control bars. You can find how they are used in the FixedSizePanels sample. The CExtPanelControlBar class may be a good container for your video player and, in this case, the CControlBar::CalcDynamicLayout() virtual method is used in a similar way like in the MFC’s control bars.
|
|
Andrew Moulden
|
Oct 27, 2007 - 12:53 PM
|
Hi,
I have just installed Prof-UIS 2.81 and my app is no longer functioning due to an assertion that is being thrown when I set a new property store in a CExtPropertyGridCtrl-derived class.
The issue appears to occur when the newly installed property store has fewer rows than the old property store, and when the row number of the focused cell in the old store is greater than the maximum number of rows in the new store. In other words the grid window calls FocusGet() and this returns the row number in the old property store, and when a check is made to ensure that this row number is less than the number of rows in the new property store, an assertion is thrown.
Hopefully this is enough info to identify the problem, but here’s the relevant part of the call stack. Note that the nRowNo in these calls is 9 when in fact the property store in the PropertyStoreSet() call only has 8 rows.
V01.exe!CExtTreeGridDataProvider::_Tree_MapRowToCache(unsigned long nRowNo=9) Line 2259 + 0x2a V01.exe!CExtTreeGridDataProvider::_Tree_NodeGetByVisibleRowIndex(unsigned long nRowNo=10) Line 932 + 0x14 V01.exe!CExtTreeGridDataProvider::TreeNodeGetByVisibleRowIndex(unsigned long nRowNo=10) Line 917 + 0x14 V01.exe!CExtTreeGridWnd::ItemGetByVisibleRowIndex(long nRowNo=10) Line 3089 + 0xc V01.exe!CExtTreeGridWnd::ItemFocusSet(_TREEITEM * hTreeItem=0x0258a814, long nColNo=1, bool bRedraw=true) Line 3762 + 0x14 V01.exe!CExtTreeGridWnd::ItemFocusSet(_TREEITEM * hTreeItem=0x0258a814, bool bRedraw=true) Line 3793 + 0x39 V01.exe!CExtPropertyGridCtrl::PropertyStoreSet(CExtPropertyStore * pPS=0x02629338) Line 9458 V01.exe!GPUISPropertyGrid::setCurrentPropertyStore(GPUISPropertyStore * propertyStore=0x02629338) Line 239 V01.exe!GPUISPropertyGrid::onNodeSelectionChange(const GNodeSelectionEvent & event={...}) Line 216 V01.exe!GEventListener<GPUISPropertyGrid,GNodeSelectionEvent>::fireEvent(const GNodeSelectionEvent & event={...}) Line 16 + 0x35 V01.exe!GListenerList<GNodeSelectionEvent>::fireEvent(const GNodeSelectionEvent & event={...}) Line 213 + 0x24 V01.exe!GNodeSelectionEvent::fire() Line 30 V01.exe!GSupport::fireEvent(GEvent & event={...}) Line 67 + 0xd V01.exe!GNodeSelectionEvent::fireEvent(int senderID=2, unsigned int selectedNodeUID=1) Line 48 V01.exe!CConfigTreeCtrl::OnTvnSelchanged(tagNMHDR * pNMHDR=0x0012fa2c, long * pResult=0x0012f6f8) Line 222 + 0x10
|
|
Andrew Moulden
|
Oct 29, 2007 - 1:35 PM
|
Thanks for the fix. No problems so far.
|
|
Technical Support
|
Oct 29, 2007 - 10:29 AM
|
Thank you for reporting this issue. To fix it, please update the source code for the following method bool CExtTreeGridWnd::ItemFocusSet(
HTREEITEM hTreeItem,
LONG nColNo,
bool bRedraw // = true
)
{
ASSERT_VALID( this );
if( hTreeItem == NULL
|| hTreeItem == ItemGetRoot()
)
return false;
if( ! ItemFocusIsLocked() )
{
CPoint ptFocus = FocusGet();
if( ptFocus.y < 0 || ptFocus.y >= RowCountGet() )
{
if( hTreeItem == NULL )
return false;
} // if( ptFocus.y < 0 || ptFocus.y >= RowCountGet() )
else
{
if( hTreeItem == NULL )
{
SelectionUnset( false, false );
FocusUnset( bRedraw );
return true;
}
HTREEITEM htiFocus = ItemGetByVisibleRowIndex( ptFocus.y );
ASSERT( htiFocus != NULL );
if( htiFocus == hTreeItem && nColNo == ptFocus.x )
return false;
} // else from if( ptFocus.y < 0 || ptFocus.y >= RowCountGet() )
if( ! ItemEnsureExpanded( hTreeItem, false ) )
return false;
ptFocus.x = nColNo;
ptFocus.y = ItemGetVisibleIndexOf( hTreeItem );
ASSERT( ptFocus.y >= 0 );
if( bRedraw )
OnSwUpdateScrollBars();
FocusSet( ptFocus, bRedraw, true, true, bRedraw );
} // if( ! ItemFocusIsLocked() )
else
{
if( bRedraw )
{
OnSwUpdateScrollBars();
OnSwInvalidate( true );
} // if( bRedraw )
} // else from if( ! ItemFocusIsLocked() )
return true;
}
|
|
Debabrata Mukherjee
|
Oct 26, 2007 - 1:46 PM
|
As we have discussed so many times, I have a CExtTabPagecontainerWnd. This window can add pages at runtime. I have new views created for thiese new pages at runtime using the following code and I store these newly created views in a CObList.
m_pChildActiveView = new CSaIsPresentationView();//Sanky 27thsep if(!m_pChildActiveView->Create(NULL,_T(""),WS_VISIBLE | WS_CHILD,CRect(200,200,1,1),m_pChildView,ID_VIEW_BASE)) { AfxMessageBox("Failed to create new sink view"); }
CWnd* wndMain = AfxGetMainWnd(); CSaIsMainFrame* mainFrame = reinterpret_cast<CSaIsMainFrame*>(wndMain); m_pChildActiveView->SetDocument((CSaIsDoc*)mainFrame->GetActiveDocument());
m_listViews.AddTail(m_pChildActiveView); // Tail added to the list.
Then I create the objects that I want to show on these views by passing these views one by one like this:
((*iterSinks).second)->m_pChildActiveView = (CSaIsPresentationView*)m_listViews.GetTail(); //get the latest CView* before u create the client sink
pSink->CreateClientSink(FALSE); //this line physically creates the client sink(the object to be placed on the view).
//Insert the page here with the view that I get from the list above. m_pChildView->PageInsert (((*iterSinks).second)->m_pChildActiveView->GetSafeHwnd(),pSink->GetSinkFullPathName());
So finally the page is inserted. But what seems very very strange is when I select some of the tabs they show the things that need to be shown while others dont
(for e.g. tab1,tab2 shows the views, then tab3 is added and every thing gets hidden. i.e. none of th tabs show any thing rather empty views are shown.)
If I open this document wth three tabs after saving them, all three tabs appear with proper views in it. This problem has harangued me for many many days and I see no respite.
Is it an issue with repainting( which is what I guess) or some flag or value of the CExtTabPageContainerWnd needs to be set properly... Please help me with this This is really urgent now!
|
|
Debabrata Mukherjee
|
Oct 29, 2007 - 8:31 AM
|
Kindly give me a reply its really urgent!
|
|
Offer Har
|
Oct 26, 2007 - 9:02 AM
|
Dear Support,
I have a resizable dialog with several anchors.
When dragging the top border some controls inside the dialog flicker - it seems that they are first drawn in the original location, and then moved to the anchor base computer location. The flickering controls are those that are anchored to the bottom of the dialog
When dragging the other 3 borders this flicker is not displayed.
Please explain how to solve this problem.
Regards, Ron.
|
|
Technical Support
|
Oct 26, 2007 - 1:15 PM
|
We agree with you but we should notice the same effect can be seen while resizing via dragging other borders. In fact, this "flicker" effect is present in any window on your desktop, but if painting algorithms are simplest as possible, then you don’t see this effect even on slow machines. It looks like Windows OS displays the "previous" content of the window first and then lets the window to paint itself. In the simplest case we have a popup window on the desktop running on a slow computer, there are no child windows inside this window, it eats up the WM_ERASEBKGND message and paints its content through a memory-based HDC when handling the WM_PAINT message. Even in this case it’s possible to see flickering you are talking about when running such a simple application on VMWare/VirtualPC. It is Interesting that other OSes (Mac OS X, Linux) also produce the same effect.
|
|
Offer Har
|
Oct 27, 2007 - 8:36 AM
|
I’m sorry, but I have to disagree with you... There is a distinct difference when dragging to top or left frame vs. the right or bottom frame, and it is only noticeable when anchoring controls to the right or bottom frame (100 in the CSize of LT for example) In this specific case the flickering is highly noticeable, and It is visible that you move the control after windows already redraw it. I know that you suppress redraw using LockWindowUpdate can’t you override the OnSize or even earlier and stop windows from drawing the window prior to moving the controls?
|
|
Debabrata Mukherjee
|
Oct 26, 2007 - 8:24 AM
|
As we have discussed so many times, I have a CExtTabPagecontainerWnd. This window can add pages at runtime. I have new views created for thiese new pages at runtime using the following code and I store these newly created views in a CObList.
m_pChildActiveView = new CSaIsPresentationView();//Sanky 27thsep if(!m_pChildActiveView->Create(NULL,_T(""),WS_VISIBLE | WS_CHILD,CRect(200,200,1,1),m_pChildView,ID_VIEW_BASE)) { AfxMessageBox("Failed to create new sink view"); }
CWnd* wndMain = AfxGetMainWnd(); CSaIsMainFrame* mainFrame = reinterpret_cast<CSaIsMainFrame*>(wndMain); m_pChildActiveView->SetDocument((CSaIsDoc*)mainFrame->GetActiveDocument());
m_listViews.AddTail(m_pChildActiveView); // Tail added to the list.
Then I create the objects that I want to show on these views by passing these views one by one like this:
((*iterSinks).second)->m_pChildActiveView = (CSaIsPresentationView*)m_listViews.GetTail(); //get the latest CView* before u create the client sink
pSink->CreateClientSink(FALSE); //this line physically creates the client sink(the object to be placed on the view).
//Insert the page here with the view that I get from the list above. m_pChildView->PageInsert (((*iterSinks).second)->m_pChildActiveView->GetSafeHwnd(),pSink->GetSinkFullPathName());
So finally the page is inserted. But what seems very very strange is when I select some of the tabs they show the things that need to be shown while others dont
(for e.g. tab1,tab2 shows the views, then tab3 is added and every thing gets hidden. i.e. none of th tabs show any thing rather empty views are shown.)
If I open this document wth three tabs after saving them, all three tabs appear with proper views in it. This problem has harangued me for many many days and I see no respite.
Is it an issue with repainting( which is what I guess) or some flag or value of the CExtTabPageContainerWnd needs to be set properly... Please help me with this This is really urgent now!
|
|
Emmanuel Verguet
|
Oct 26, 2007 - 8:06 AM
|
Hello,
I have the following problem. I have a dialog which size is 612x14 (in resources units), with child style and no borde. It is embedded in a control bar. Initial docked height of this CControlBar is around 100 pixels, not around 40 pixels. So I have a lot of space below the controls. I guess I have to use SetInitDesiredSizeHorizontal(), but I don’t find the way to compute my 14 pixel resource unit + height of CControlBar caption.
Thanks.
|
|
Technical Support
|
Oct 26, 2007 - 1:11 PM
|
Here is how you can retrieve the size of the child dialog CRect rc;
m_wndBarDlg.GetClientRect(rc);
CSize sz = CSize(rc.Width(),rc.Height()); And below is how you can get the height of the control bar borders CRect rcClient;
m_wndBar.GetClientRect(rcClient);
CRect rcWnd;
m_wndBar.GetWindowRect(rcWnd);
INT nHeight = rcWnd.Height() - rcClient.Height();
|
|
Krustys Donuts
|
Oct 24, 2007 - 3:19 PM
|
Hi Prof-uis!
I am using a CExtPropertyGridCtrl and would like to add a multi-line edit control, as well as custom controls that could span multiple lines (for example a small custom dialog as an in-place control which may be larger in size than the current row size).
Is this possible and is there an example?
Thanks!
|
|
Technical Support
|
Oct 29, 2007 - 1:30 PM
|
Yes, you can use custom grid cell classes and a multiline text cell class (e.g. CExtGridCellString ) in the property grid control. By default, the CExtPropertyGridCtrl class initializes property rows with default heights. You should create and use your own CExtPropertyValue -derived class which implements the CExtPropertyItem::OnGridRowInitialized() virtual method. This method is invoked when the tree grid’s item corresponding to the property value is inserted into tree grid window inside the property grid control. This allows you to specify the desired row height in the tree grid window using the CExtGridWnd::BestFitRow() method.
You can see how to use multiline cells in the Prof-UIS_Controls sample. Just open the Grid page and find the Text column.
|
|
Johnny Booth
|
Oct 24, 2007 - 12:21 PM
|
It seems that the following code is wrong in CExtLabel.cpp @ line 238:
You have: bool bForceSingleLine = ( strText.Find( _T("\n") ) >= 0 ) ? true : false;
This should be: bool bForceSingleLine = ( strText.Find( _T("\n") ) >= 0 ) ? false : true;
If the text HAS a linefeed, then you wouldn’t want to force it to a single line.
The way you have it, any static text item that has a linefeed in the string gets drawn incorrectly (all on one line).
|
|
Technical Support
|
Oct 26, 2007 - 7:48 AM
|
You absolutely right, it’s our fault. Thank you for reporting this. We have just updated the drawing code as you suggested.
|
|
Francesco Toscano
|
Oct 24, 2007 - 9:50 AM
|
Is it possible to set the border color and the width border, of a cell in a grid? If it possible , can you explain how?
Then, I have started a Thread on 19th of october "Joining cell inside a column question"...but with no answer from you....It is just a remainder!!
Thanks Francesco
|
|
Technical Support
|
Oct 29, 2007 - 1:16 PM
|
It is possible to reserve some space around cells and paint this space using some color. Normally you see grid cells placed near each other, but it’s possible to reserve some extra space above/below each/some of rows and some extra space at left/right of each/some of columns. You can invoke the CExtGridCell::ExtraSpaceSet() method for the header cell to specify desired extra space in pixels before/after corresponding column/row. The CExtGridBaseWnd::OnGbwPaintExtraSpaceH() and CExtGridBaseWnd::OnGbwPaintExtraSpaceV() virtual methods can be used for filling this extra space around grid cells with some color. The extra space support is important built in feature of the CExtGridWnd class and based on it classes. Most of methods related to any actions dependent on cell location have two rectangles in parameters specifying cell location including/excluding its extra spaces around it: const RECT & rcCellExtra,
const RECT & rcCell, For instance, the CExtReportGridWnd class uses extra space at the bottom of the data rows for implementation of the row preview feature.
|
|
Luis Antunes
|
Oct 25, 2007 - 8:02 AM
|
I also have both problems. Is it possible at all, to do this?
Thanks Luis
|
|