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 t
|
May 21, 2008 - 2:38 AM
|
Hello. I want to change English message for a Japanese message.
Please teach a good method.
|
|
Technical Support
|
May 22, 2008 - 4:17 AM
|
There is one problem with translating these color names into Japanese: The CExtGridCellColor::GetColorName() method is virtual in v.2.83, but not virtual in 2.82. You should mark it as virtual if you are using 2.82 or earlier, create your own CExtGridCellColor -derived class and implement this virtual method.
|
|
tera t
|
May 22, 2008 - 3:20 AM
|
I copied a source and coped. Thanks,
|
|
tera t
|
May 21, 2008 - 12:14 AM
|
Hello. May I use __EGCS_EX_USER_STYLE_00 ?
|
|
Technical Support
|
May 22, 2008 - 4:16 AM
|
|
|
seongjin hyun
|
May 20, 2008 - 10:12 PM
|
Dear Sir, How to Place the Company Logo on the Top DockBar of the SDI Frame Window? Best Regards,
|
|
Technical Support
|
May 22, 2008 - 4:20 AM
|
There are at least two ways to do this:
1) You implement custom background painting for the entire main frame window as it is demonstrated in the TabbedBars sample where you can optionally turn on a custom background.
2) Use the method demonstrated in the menu bar window in the following test project:
testLogoInMenuBar.zip
|
|
Courtney Smith
|
May 19, 2008 - 3:48 PM
|
Hello, I have an edit box that is numbers only and when the user enters something like a letter. It shows the stadard message unacceptable character. The problem is when it shows the box even though its not over the CExtGroupBox that surrounds the edit control, it messes up the painting of the label on the group box. Have you guys seen this or know how to fix it? Thanks, CJ
|
|
Technical Support
|
May 20, 2008 - 12:20 PM
|
We need your help in order to reproduce this problem. We created the following simplest possible application but it works OK.
The single line control in it uses the following DDX entries for number validation: DDX_Control(pDX, IDC_EDIT1, m_wndEdit1);
DDX_Text(pDX, IDC_EDIT1, m_nEditValueAsLong);
DDV_MinMaxLong(pDX, m_nEditValueAsLong, 0, 100); All the other dialog controls are subclassed automatically.
|
|
Krustys Donuts
|
May 19, 2008 - 9:42 AM
|
In regards to my May 16, 2008 - 3:10 PM question: After further testing, I found that overriding the OnGbwDataDndIsAllowed method and returning a value of true causes the scrolling problem described in the initial email. If I comment out this function, clicking on a cell in the far right column does not auto-scroll to the 1st column of the grid. Any thoughts? As well, my tree grid has two layers of nodes. As it is now, when I double-click anywhere on the row of the top node, the node is collapsed or expanded. It there any way to limit the collapse/expand functionallity to the plus/minus button? Gil
|
|
Krustys Donuts
|
May 21, 2008 - 4:19 PM
|
Is the fix to the CExtGridBaseWnd::OnLButtonUp method going to be in the next release of the Prof-UIS?
|
|
Technical Support
|
May 22, 2008 - 12:18 PM
|
|
|
Technical Support
|
May 19, 2008 - 11:42 AM
|
You came across the really interesting issue related to the unexpected horizontal scrolling in the drag-n-drop enabled tree grid window. To fix it, please update the source code for the CExtGridBaseWnd::OnLButtonUp() method in the ../Prof-UIS/Src/ExtGridWnd.cpp file: void CExtGridBaseWnd::OnLButtonUp(UINT nFlags, CPoint point)
{
ASSERT_VALID( this );
if( OnGbwDataDndIsAllowed() && m_eMTT == __EMTT_DATA_DND_STARTING )
{
SendMessage( WM_CANCELMODE );
bool bAlt = ( (::GetAsyncKeyState(VK_MENU)&0x8000) != 0 ) ? true : false;
bool bCtrl = ( (::GetAsyncKeyState(VK_CONTROL)&0x8000) != 0 ) ? true : false;
bool bShift = ( (::GetAsyncKeyState(VK_SHIFT)&0x8000) != 0 ) ? true : false;
bool bCtrlOnly = bCtrl && (!bAlt) && (!bShift);
bool bShiftOnly = (!bCtrl) && (!bAlt) && bShift;
bool bNoModifiers = (!bCtrl) && (!bAlt) && (!bShift);
bool bMultiAreaSelection = MultiAreaSelectionGet();
bool bReplaceOldSelection =
(!bMultiAreaSelection)
|| (!(bCtrlOnly || bShiftOnly));
if( ! ( bCtrlOnly || bNoModifiers ) )
return;
CExtGridHitTestInfo htInfo( point );
HitTest( htInfo, false, true );
DWORD dwSiwStyles = SiwGetStyle();
if( (dwSiwStyles & __EGBS_SFB_MASK) != __EGBS_SFB_NONE
&& ( htInfo.m_nColNo >= 0 || htInfo.m_nRowNo >= 0 )
)
{ // if any selection mode can be tracked
if( (htInfo.m_dwAreaFlags & __EGBWA_INNER_CELLS) != 0 )
{
LONG nColumnCount = ColumnCountGet();
LONG nRowCount = RowCountGet();
if( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_FULL_COLUMNS )
{
if( htInfo.m_nColNo >= 0 )
{
if( bNoModifiers )
{
CPoint ptNewFocus( htInfo.m_nColNo, htInfo.m_nRowNo );
SelectionSet( ptNewFocus, true, false, false );
FocusSet( ptNewFocus, true, true, false, false );
OnSwDoRedraw();
return;
} // if( bNoModifiers )
ASSERT( bCtrlOnly );
if( (dwSiwStyles & __EGBS_SFM_COLUMNS) == 0
|| (! SelectionGetForCell( htInfo.m_nColNo, 0 ) )
|| bReplaceOldSelection
)
return; // processed in WM_LBUTTONDOWN
CRect rcSelection( htInfo.m_nColNo, 0, htInfo.m_nColNo, nRowCount-1 );
SelectionSet( rcSelection, bReplaceOldSelection, false, false );
EnsureVisibleColumn( htInfo.m_nColNo, true );
} // if( htInfo.m_nColNo >= 0 )
return;
} // if( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_FULL_COLUMNS )
else if( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_FULL_ROWS )
{
if( htInfo.m_nRowNo >= 0 )
{
if( bNoModifiers )
{
CPoint ptNewFocus( htInfo.m_nColNo, htInfo.m_nRowNo );
SelectionSet( ptNewFocus, true, false, false );
FocusSet( ptNewFocus, true, true, false, false );
OnSwDoRedraw();
return;
} // if( bNoModifiers )
ASSERT( bCtrlOnly );
if( (dwSiwStyles & __EGBS_SFM_ROWS) == 0
|| (! SelectionGetForCell( 0, htInfo.m_nRowNo ) )
|| bReplaceOldSelection
)
return; // processed in WM_LBUTTONDOWN
CRect rcSelection( 0, htInfo.m_nRowNo, nColumnCount-1, htInfo.m_nRowNo );
SelectionSet( rcSelection, bReplaceOldSelection, false, false );
EnsureVisibleRow( htInfo.m_nRowNo, true );
} // if( htInfo.m_nRowNo >= 0 )
return;
} // else if( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_FULL_ROWS )
else
{
ASSERT( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_CELLS );
DWORD dwScrollTypeH = SiwScrollTypeHGet();
DWORD dwScrollTypeV = SiwScrollTypeVGet();
if( 0 <= htInfo.m_nColNo && (htInfo.m_nColNo < nColumnCount || dwScrollTypeH == __ESIW_ST_VIRTUAL )
&& 0 <= htInfo.m_nRowNo && (htInfo.m_nRowNo < nRowCount || dwScrollTypeV == __ESIW_ST_VIRTUAL )
)
{ // if column and row numbers specified
if( bNoModifiers )
{
CPoint ptNewFocus( htInfo.m_nColNo, htInfo.m_nRowNo );
SelectionSet( ptNewFocus, true, false, false );
FocusSet( ptNewFocus, true, true, false, false );
OnSwDoRedraw();
return;
} // if( bNoModifiers )
ASSERT( bCtrlOnly );
if( (dwSiwStyles&(__EGBS_SFM_COLUMNS|__EGBS_SFM_ROWS)) == 0
|| (! SelectionGetForCell( htInfo.m_nColNo, htInfo.m_nRowNo ) )
|| bReplaceOldSelection
)
return; // processed in WM_LBUTTONDOWN
CPoint ptNewFocus( htInfo.m_nColNo, htInfo.m_nRowNo );
if( ! AutoFocusBottomRightGet() )
FocusSet( ptNewFocus, true, true, false, false );
SelectionSet( ptNewFocus, false, false, true );
return;
} // if column and row numbers specified
} // else from else if( (dwSiwStyles & __EGBS_SFB_MASK) == __EGBS_SFB_FULL_ROWS )
} // if( (htInfo.m_dwAreaFlags & __EGBWA_INNER_CELLS) != 0 )
} // if any selection mode can be tracked
return;
} // if( OnGbwDataDndIsAllowed() && m_eMTT == __EMTT_DATA_DND_STARTING )
if( m_eMTT != __EMTT_NOTHING )
SendMessage( WM_CANCELMODE );
if( OnGbwAnalyzeCellMouseClickEvent(VK_LBUTTON,0,nFlags,point) )
return;
CExtScrollItemWnd::OnLButtonUp(nFlags, point);
} You can override the CExtGridBaseWnd::OnGbwAnalyzeCellMouseClickEvent() virtual method in your CExtTreeGridWnd -derived class so you can disable its row double click behavior: bool CYourCustomTreeGridWnd::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 );
ASSERT( 0 <= nRepCnt && nRepCnt <= 3 );
if( nChar == VK_LBUTTON )
{
CExtGridHitTestInfo htInfo( point );
HitTest( htInfo, false, true );
if( htInfo.IsHoverEmpty()
|| (! htInfo.IsValidRect() )
)
return false;
INT nColType = htInfo.GetInnerOuterTypeOfColumn();
INT nRowType = htInfo.GetInnerOuterTypeOfRow();
if( nColType == 0
&& nRowType == 0
)
{
if( ( nRepCnt == 1
&& OnTreeGridQueryColumnOutline( htInfo.m_nColNo )
&& (htInfo.m_dwAreaFlags&__EGBWA_TREE_OUTLINE_AREA) != 0
)
&& (htInfo.m_dwAreaFlags&(__EGBWA_CELL_BUTTON|__EGBWA_CELL_CHECKBOX)) == 0
)
{
HTREEITEM hTreeItem = ItemGetByVisibleRowIndex( htInfo.m_nRowNo );
if( ( nRepCnt == 2
&& hTreeItem != NULL
&& ItemGetChildCount( hTreeItem ) > 0
)
|| (htInfo.m_dwAreaFlags&__EGBWA_TREE_BOX) != 0
)
{
OnTreeGridToggleItemExpandedState(
htInfo.m_nRowNo,
&htInfo
);
return true;
}
}
}
} // if( nChar == VK_LBUTTON && ( nRepCnt == 1 || nRepCnt == 2 ) )
if( nRepCnt == 2 )
return
CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent( // not CExtTreeGridWnd
nChar,
nRepCnt,
nFlags,
point
);
return
CExtTreeGridWnd::OnGbwAnalyzeCellMouseClickEvent(
nChar,
nRepCnt,
nFlags,
point
);
}
|
|
Offer Har
|
May 17, 2008 - 8:19 AM
|
Does it work on columns header as well?
|
|
Technical Support
|
May 17, 2008 - 12:59 PM
|
Yes, columns and row header areas including their corners support merging.
|
|
Offer Har
|
May 17, 2008 - 8:17 AM
|
Hello, I reported several problems in version 2.83 - were you able to reproduce them? Are you going ot fix them for the coming release? When is the release due? Thanks - Ron.
|
|
Offer Har
|
May 23, 2008 - 7:57 AM
|
Well, I hope they are working very hard on fixing the bugs that they don’t have time to answer...
|
|
Paul Cowan
|
May 23, 2008 - 7:55 AM
|
I too have reeported several issues with 2.83 and have not heard anything from Foss.
|
|
Offer Har
|
May 16, 2008 - 5:12 PM
|
I sent you a while ago a clip of a flicker problem when resizing a two columns tree grid when the grid was not in focus before the beginning of the column drag. I see that this bug still persist in 2.83
|
|
Offer Har
|
Jun 2, 2008 - 8:52 AM
|
Any plans to fix this bug?
|
|
Timothy Anderson
|
May 16, 2008 - 2:00 PM
|
Any pointers for using auto menu in an mdi frame instead of an sdi frame? It doesn’t seem to want to display the doc related menu after running the example VBS.
|
|
Timothy Anderson
|
May 16, 2008 - 3:15 PM
|
MenuInfoAdd, it’s a good thing.
|
|
Technical Support
|
May 17, 2008 - 12:22 PM
|
Yes, you are right. But some people would prefer to see one universal menu in MDI interface.
|
|
Timothy Anderson
|
May 20, 2008 - 3:15 PM
|
Even though we are using your fabu toolkit, our app is still a bit in the dark ages as far as menu processing goes...
|
|
Technical Support
|
May 22, 2008 - 4:22 AM
|
Would you tell us what areas remain dark so that we can help you?
|
|
Technical Support
|
May 16, 2008 - 2:26 PM
|
Could you tell us where you encountered the problem described in your message? The ProfAuto-based applications like SimpleScripts or ActiveScripts sample provided with Prof-UIS are simply the applications with customizable toolbars and menus which support COM wrapper objects exported by ProfAuto library to a COM capable language engine. The VBS code is able to switch the active menu manually regardless of automatic menu switching according to activated MDI child frame window. The IExtAutoWindow::ActiveMenuName property allows you to select the menu tree displayed in the menu bar.
|
|
Daisy Peterson
|
May 16, 2008 - 1:05 PM
|
I have no idea what is causing this, and I cannot reproduce it in your sample application. Our main frame has been updated to use Prof-UIS, even though the frame class itself is from another library. This class ultimately is derived from CMDIFrameWnd. That said, I have implemented the following: class CMyFrame : public CExtNCW< SECWorkbook>,
public CExtDynamicBarSite,
public CExtCustomizeSite and in the OnCreate of the frame: CExtControlBar::FrameEnableDocking( this );
CExtControlBar::FrameInjectAutoHideAreas( this );
CExtDynamicBarSite::Install( this ); I create my CExtDynamicControlBar s on the fly utilizing CExtDynamicBarSite::BarAlloc. The dynamic control bars show up just fine. I can dock them, float them, MDI them. But if I unpin them, they go into the auto hide mode, I see the tab button. I click on something else, the bar hides. I mouse over to the tab button, the button disappears and the hidden bar, of course, never reshows itself. It is possible that if I dock another window to the same edge the tab might come back, but it almost certainly will disappear yet again as soon as I do the aforementioned steps. I’ve been trying to figure out what might possibly be causing this behavior to no avail. Using a message spy program on both your sample and my application shows that in my application the CExtTabWnd is not getting any timer messages or paint messages, though it continues to receive mouse messages. If I debug into the mouse handler of CExtTabWnd, it says although there are apaprently visible buttons, the mouse isn’t over them. Any suggestions would be greatly appreciated... Kevin Murray
|
|
Kevin Murray
|
May 16, 2008 - 3:35 PM
|
Well, you are correct that WM_SIZEPARENT is not getting through. I don’t know where it’s going, but it isn’t getting through. Whenever I dock another window to the same side as the missing tab(s), they come back, but again, as soon as they are used they go away. I’ll do some investigating and try to determine why the message dies... Kevin Murray
|
|
Technical Support
|
May 17, 2008 - 12:29 PM
|
Your investigation needs the presence of all the UI related source code. Otherwise you can only exclude the usage of components available as binaries only to come to conclusion about who eats messages and modifies the default behavior of the frame window. Some additional information. When the frame window’s size becomes changed, it invokes the CFrameWnd::RecalcLayout() virtual method which simply invokes the CWnd::RepositionBars() method. Dialog based sample applications in Prof-UIS with control bar windows invoke the CWnd::RepositionBars() method from the dialog’s OnSize() handler method. The CWnd::RepositionBars() method sends a WM_SIZEPARENT message to all the child windows and allows them to take up the required space near window borders. But the CWnd::RepositionBars() method and WM_SIZEPARENT message can also be used for calculating the rest free space which is free of any bars in the center of the window and this center space is used for a view window in SDI applications and for an MDI client area window in MDI applications. So, the CWnd::RepositionBars() API and WM_SIZEPARENT message represent an important and very frequently used feature of MFC rather than of Win32 API (though the WM_SIZEPARENT preprocessor symbol starts from WM ).
|
|
Kevin Murray
|
May 18, 2008 - 7:09 PM
|
Well, now I’m to the point where the tabs don’t repaint themselves. You can mouse over the tab, the window shows itself. Move away, it hides. Move to another tab, the tabs disappear and no windows show themselves. It will stay this way till I can force a repaint, say by switching to another application then switching back. Any ideas on this one? I hope it is a simple repaint issue, and not that the tab windows think they don’t have any tabs any more. But if I debug, as soon as I switch into the debugger, it says all is good and the tabs will redraw. I’ve tried forcing a RedrawWindow() for the auto-hide areas on WM_NCACTIVATE, but that isnt’ working. Tried Invalidate() as well; tried them both together. Kevin Murray
|
|
Technical Support
|
May 19, 2008 - 9:31 AM
|
Please check the following:
1) Your main frame should have the WS_CLIPSIBLINGS|WS_CLIPCHILDREN styles set on (use the SPY++ utility for that). Although Prof-UIS tries to forcibly set these styles to the main frame window, please check whether they are really added.
2) Do you have some painting code based on CDC::GetDC() API or ::GetDC() API invoked for the main frame window with flags for retrieving the entire window/client DC without any clipping?
Such fantastic problems require similar fantastic approaches for resolving them: in the hardest case you will need to comment out some parts of your project one by one until the problem is gone and then try to understand what causes the problem.
|
|
Kevin Murray
|
May 22, 2008 - 12:10 PM
|
Once again, you guys prove you know your stuff. :) Turns out, after heavy debugging, the base class we are using has a member they call m_pMDIClientArea, which overrides OnPaint. So as long as I override OnPaint, let the base class do its thing, then do the repaint of the control bars, all is well. My question to you now is this:
void CMyFrame::OnPaint()
{
__super::OnPaint();
RepositionBars( 0, 0xFFFF, 0 );
}
That’s what I have. The hide animation, though, is now terribly slow. The CExtDynAutoHideArea’s do not seem to respond to a RedrawWindow() request. Is there a more effecient way to repaint these in the OnPaint handler so the animation is smoother? K.
|
|
Technical Support
|
May 22, 2008 - 1:03 PM
|
The WM_PAINT , WM_ERASEBKGND and WM_NCPAINT message handlers should draw something into the device context and should not do anything with windows including their states, positions and visibility. Otherwise, these message handlers will cause further sending of these messages to the same and/or other windows. Although what was just said above is true, preventing the window procedure of the MDI client area window from receiving the WM_ERASEBKGND message can cause the MDI interface to work incorrectly.
Could you send us source code of your improved frames and source code of class which subclasses the MDI client area window (type of m_pMDIClientArea ) ?
|
|
Kevin Murray
|
May 22, 2008 - 5:03 PM
|
Unfortunately I cannot send you the source code as it is a purchased product, much like your library. I can tell you they call RepositionBars(...reposQuery) to adjust the client rectangle before they do their drawing. However, they end with the following:
RedrawWindow(NULL, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN);
I suspect that might be the problem.
K.
|
|
Technical Support
|
May 23, 2008 - 2:04 PM
|
It would be extremely interesting to know what the non-Prof-UIS UI classes really do in your project? We have a lot of test applications which modify different behaviors of MDI, SDI and dialog based applications. These test applications have been collected as replies and suggestions to Prof-UIS users during more than five years. It’s possible we can provide you with a ready-to-use solution which allows you to remove the code conflicting with Prof-UIS.
|
|
Technical Support
|
May 16, 2008 - 2:34 PM
|
The CExtNCW template class in Prof-UIS 2.82 has a specialized version for MDI child frames, but the MDI child window support in this class is beta and requires usage of the CExtNCW < CMDIChildWnd > template based type rather than CExtNCW < SECWorkbook > . This template class is completely re-coded in Prof-UIS 2.83 and well supports MDI child frames even without specialized version for the CMDIChildWnd class. We can provide you v.2.83 beta.
The auto hide tabs handle the standard MFC’s WM_SIZEPARENT message which allows them to take up the required space inside an MFC frame window. The auto hide tabs (CExtDynAutoHideArea ) work similar to standard MFC control bars which are not enabled for drag-and-drop based re-docking. In other words, auto-hide tabs are the windows like a status bar. But the tabs are not based on MFC’s CControlBar class which is really not critical and do not conflict with MFC. If you are using some framework or library which filters WM_SIZEPARENT messages through some hooks or message pre-translation and do not allow you to receive these messages to some windows that are not based on CControlBar , the auto hide tabs can really disappear. But there is no point to filter out WM_SIZEPARENT messages. If you need to "inject" some window between control bars in an MFC frame window, you should handle WM_SIZEPARENT messages in this window and do not do anything else. This will allow you to code your own MDI tabs like window or your own caption window similar to the popup blocking alert window with text message and "X" button in Mozilla Firefox or Internet Explorer. Of course, you can set a breakpoint in the CExtDynAutoHideArea::OnSizeParent() method and see whether the WM_SIZEPARENT messages are delivered to the auto hide tabs. There are four CExtDynAutoHideArea windows that are created in an MFC frame window by the CExtControlBar::FrameInjectAutoHideAreas() method and each docks itself to one side of its parent frame window.
|
|
Dominik Braendlin
|
May 16, 2008 - 1:05 AM
|
Hi I have adapted the PageContainer example to work within my project. If I change the size of the PageContainer window the pages will stretch in width. Is there an easy way to also have them stretch in height? I would like to avoid the scrollbar within a pageitem. Imagine you display a picture on one of the pageitems e.g. in a dialog. I would like to stretch this on in width and height. Not only in width. Best regards
|
|
Dominik Braendlin
|
May 26, 2008 - 1:22 AM
|
Thanks for your help. It works.
|
|
Dominik Braendlin
|
May 26, 2008 - 1:21 AM
|
Thanks for your help. It works.
|
|
Dominik Braendlin
|
May 20, 2008 - 12:34 AM
|
Concerning my request about the PageContainer. Please have a look at the PageContainer example especially at the “Custom-drawn page container” which is the free floating window within this demo. Focus on the first part called Dialog including the Label, Check1, Check2 and Check3 items. If you stretch the window horizontally these items are stretched accordingly. If you stretch the window vertically the items are not stretched at all. Imagine instead of the Label, Check1, Check2 and Check3 items you have a picture in the Dialog item. If you stretch the window horizontally the picture could always have the same width as the window.
That is where my problem starts to arise. If the picture gets stretched in width it should also be stretched in height. Since the height of the dialog keeps the initial height the picture has no room to gain in height. As I stretch the window horizontally I would need the Dialog item to be stretched in height as well as in width. Therefore the other items such as “Custom-drawn Shortcut List Window”, “Listview Control” and “Web Browser Control” should dynamically move up or down, depending on the space I need for my Dialog item. Please let me know if there is a way to solve my picture issue.
Best regards
|
|
Technical Support
|
May 16, 2008 - 1:47 PM
|
The CExtPageContainerWnd class supports two types of the layout behavior:
1) Like in Outlook 98/2000/XP. Only one page is expanded and it’s stretched to the entire available height. Other pages are collapsed. The scrollbar like area is never used.
2) Like in 3D Studio MAX. Many pages can be expanded and/or collapsed at the same time. Scrollbar like area is available.
The PageContainer sample provides both options (available from the menu). Please let us know whether you need the Outlook mode or you are looking for some other layout which has not been implemented yet?
|
|
Dominik Braendlin
|
May 20, 2008 - 12:35 AM
|
Concerning my request about the PageContainer. Please have a look at the PageContainer example especially at the “Custom-drawn page container” which is the free floating window within this demo. Focus on the first part called Dialog including the Label, Check1, Check2 and Check3 items. If you stretch the window horizontally these items are stretched accordingly. If you stretch the window vertically the items are not stretched at all. Imagine instead of the Label, Check1, Check2 and Check3 items you have a picture in the Dialog item. If you stretch the window horizontally the picture could always have the same width as the window.
That is where my problem starts to arise. If the picture gets stretched in width it should also be stretched in height. Since the height of the dialog keeps the initial height the picture has no room to gain in height. As I stretch the window horizontally I would need the Dialog item to be stretched in height as well as in width. Therefore the other items such as “Custom-drawn Shortcut List Window”, “Listview Control” and “Web Browser Control” should dynamically move up or down, depending on the space I need for my Dialog item. Please let me know if there is a way to solve my picture issue.
Best regards
|
|
Technical Support
|
May 20, 2008 - 12:14 PM
|
The custom drawn page container uses a 3D Studio Max layout and behavior. The mutual layout of page windows is computed according to the real height of each window. The page container control can change the width of all pages but can never change their height. So, if you need some page window with an automatically adjustable height, you should handle the WM_SIZE message in this page window, compute the required height according to the changed width and let the window resize itself vertically using the SetWindowPos() or MoveWindow() APIs if needed. If the page window resizes itself vertically and its window has the WS_VISIBLE style (i.e. the page is not contracted), the page container’s CExtPageContainerWnd::UpdatePageContainerWnd() method should be invoked to re-compute the mutual layout of all page windows. You can simply invoke ( STATIC_DOWNCAST( CExtPageContainerWnd, GetParent() ) ) -> UpdatePageContainerWnd(); from the WM_SIZE message handler of your page window after it has adjusted its height using the SetWindowPos() API.
|
|
Dominik Braendlin
|
May 22, 2008 - 3:22 AM
|
I‘ve been trying to use your latest suggestions, but I was not successful. Should I call UpdatePageContainerWnd with false or true? If I call the SetWindowPos within WM_SIZE of the panel it triggers a new WM_SIZE.
In order to save time, I would like to ask you, if you could extend the PageContainer example program with the behavior I am looking for. In my case the height of the panel under Dialog with the Label, Check1, Check2 and Check3 should always have the same length as the width (width == height). As you drag the “Custom-draw page container” the Dialog panel should grow or shrink in height accordingly.
|
|
Technical Support
|
May 23, 2008 - 6:33 AM
|
A sample test project is not a problem. Please find then following line in the MainFrm.h file in the PageContainer sample (it’s a property of the CCustomDrawnPageContainer class): CListCtrl m_wndPage2; Then please replace the line of code above with the following code: class CMyListCtrl : public CListCtrl
{
public:
INT CalculateDesiredHeight()
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
CRect rcClient;
GetWindowRect( &rcClient );
// for testing, we will make height of this list view common
// control equal to its width, i.e. it will have square shape
INT nDesiredHeight = rcClient.Width();
// ... or you can uncomment next line to make height equal 2/3 of width
// nDesiredHeight = ::MulDiv( nDesiredHeight, 2, 3 );
return nDesiredHeight;
}
protected:
void CheckHeight( bool bUpdateNow )
{
ASSERT_VALID( this );
ASSERT( GetSafeHwnd() != NULL );
CRect rc;
GetWindowRect( &rc );
INT nCurrentHeight = rc.Height();
INT nDesiredHeight = CalculateDesiredHeight();
if( nCurrentHeight != nDesiredHeight )
{
if( bUpdateNow )
{
// we assume this CMyListCtrl window is always created as
// child of the CExtPageContainerWnd window in scope of this project
CExtPageContainerWnd * pWndParent =
STATIC_DOWNCAST( CExtPageContainerWnd, GetParent() );
rc.bottom = rc.top + nDesiredHeight;
pWndParent->ScreenToClient( &rc );
//MoveWindow( &rc ); // even this is not needed
LONG nPageIndex = pWndParent->PageFind( m_hWnd );
ASSERT( nPageIndex >= 0 );
CExtPageContainerWnd::PAGE_ITEM_INFO * pPII = pWndParent->PageGetInfo( nPageIndex );
ASSERT( pPII != NULL );
pPII->SetRectInitial( rc ); // sorry, we forgot about this one thing
pWndParent->UpdatePageContainerWnd( true );
}
else
PostMessage( WM_USER+321 );
}
}
virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = CListCtrl::WindowProc( message, wParam, lParam );
switch( message )
{
case WM_SIZE:
CheckHeight( false );
break;
case (WM_USER+321):
CheckHeight( true );
break;
}
return lResult;
}
};
CMyListCtrl m_wndPage2; As a result, the list control that uses the 32x32 icon mode in the custom drawn page container window will behave like you need. The CMyListCtrl class is close to the approach we suggested you in our previous answer. We just forgot about the SetRectInitial() API invocation and protecting the message loop overflow with delayed layout updating. You can also download a modified version of the PageContainer sample with the improvements described above.
|
|
Krustys Donuts
|
May 15, 2008 - 10:24 AM
|
I have a CExtTreeGridWnd object functioning fine except the scrolling feature. The scrollbars function fine except when I select a cell that is horizontally scrolled onto the screen. In this case, the scrollbars automatically reset such that the first column is displayed. For example, there are 20 columns in the grid. When viewing (done by scrolling) the 20th column, the 1st column is no longer visible. If I click on a cell in column 20, the H-scrollbar is set to the far left so that the 1st column is visible (and the 20th column is not visible.) I would like to prevent this auto-scrolling. I am using the __EGBS_SFB_FULL_ROWS feature. See grid styles below. On a different note, I would like to fix the first three columns in grid. That is, when scrolling horizontally, only the last 17 columns scroll. Is this possible? Thanks, Gil
//Enable
SiwModifyStyle( __ESIS_STH_PIXEL
|__EGBS_SUBTRACT_SEL_AREAS
|__ESIS_STV_ITEM
|__EGBS_SFB_FULL_ROWS // | __EGBS_SFM_CELLS_HV
|__EGBS_RESIZING_CELLS_OUTER_H
|__EGBS_DYNAMIC_RESIZING
|__EGBS_MULTI_AREA_SELECTION
|__EGBS_NO_HIDE_SELECTION
|__EGBS_GRIDLINES
|__EGBS_LBEXT_SELECTION,
0,
false);//Enable
SiwModifyStyleEx( __EGWS_EX_PM_COLORS,
// |__EGBS_EX_CELL_TOOLTIPS_OUTER_T
// |__EGBS_EX_CELL_TOOLTIPS_INNER,
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);
|
|
Krustys Donuts
|
May 16, 2008 - 3:10 PM
|
After further testing, I found that overriding the OnGbwDataDndIsAllowed method and returning a value of true causes the scrolling problem described in the initial email. If I comment out this function, clicking on a cell in the far right column does not auto-scroll to the 1st column of the grid. Any thoughts? As well, my tree grid has two layers of nodes. As it is now, when I double-click anywhere on the row of the top node, the node is collapsed or expanded. It there any way to limit the collapse/expand functionallity to the plus/minus button? Gil
|
|
Technical Support
|
May 15, 2008 - 1:15 PM
|
We believe the scrolling problem depends on some particular grid styles and/or overridden virtual methods. Could you try to re-produce it using this test project?
v.2.83, which is to be released in a few days supports, introduces frozen columns/rows. You can mark one column as frozen and it will not be scrollable.
|
|
Nigel Channon
|
May 15, 2008 - 2:41 AM
|
Hi. I want assign icons with all my items in tree. So... I try use simple code: parent = m_tree->ItemInsert( NULL );
m_tree->ItemExpand( parent );
CExtGridCell * cell = m_tree->ItemGetCell( parent, 0, 0, RUNTIME_CLASS( CExtGridCellStringDM) );
cell->DataProviderGet()->IconInsert(&m_DeviceIcon,1);
cell->IconIndexSet(1);
cell -> TextSet(L"Simple text"); But in this case I see icons and don`t see text. Where I make mistake?
|
|
Nigel Channon
|
May 19, 2008 - 2:58 AM
|
If I insert icon with greater height as text-height then GridCellRectsGet() will use height (of icon) for computing height of cell?
|
|
Technical Support
|
May 19, 2008 - 9:26 AM
|
In a grid cell, any icon is used without resizing and any other adjustments. You may need to increase the row height and/or column width for the grid cell with a large icon. The best way is to initialize all grid cells in some row/column and then invoke the CExtGridWnd::BestFitColumn() and/or CExtGridWnd::BestFitRow() methods.
|
|
Technical Support
|
May 16, 2008 - 2:57 AM
|
We noticed that you insert an icon object at position 1 in the internal collection of icons inside the data provider object. If it is inserted many times, you may encounter a problem of finding correct icon indices for each particular grid cell.
Besides, you should to re-paint the grid cell area from your code after assigning an icon index to it. The CExtGridWnd::GridCellRectsGet() method allows you to compute grid cell location in client coordinates of grid control for further invalidation. This method returns false if the cell location cannot be computed (the cell is outside the displayed cell range and you don’t need to invalidate its rectangle).
|
|
Riccardo Parenzan
|
May 15, 2008 - 2:10 AM
|
Hello, I’ve developed a small application to learn Prof-UIS library. In a CExtNCW < CExtResizableDialog > I put an CExtEdit (m_Edt1) and a CExtLabel (m_StcLabel), like this code...
CFont cf;
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 40;
strcpy(lf.lfFaceName, "Arial");
cf.CreateFontIndirect(&lf);
m_StcLabel.SetTextColor(1,RGB(255, 0, 0));
m_StcLabel.SetFont(&cf);
m_Edt1.SetTextColor(RGB(255, 0, 0));
m_Edt1.SetFont(&cf);
m_StcLabel works fine, is red with correct font, but m_Edt1 is red, with a big cursor, but the font is not 40.
Have you some suggestion ?
Thanks in advance
|
|
Technical Support
|
May 17, 2008 - 12:32 PM
|
It seems we already answered you by e-mail. Here is our answer:
You created a CFont object on stack. The cf variable is local in scope of the method where you set the font. That means it will be destroyed after the method completes. You should create the CFont object dynamically or declare it in the class declaration section.
|
|
Chris Anderson
|
May 14, 2008 - 12:53 PM
|
Is there any way to disable theming in prof-uis app? I looked at the FormEditor sample ( Prof-UIS v283 + VS2005 ), the project file already include additional manifest file , manifest_x86.xml, and it’s already calling InitCommonControls() function inside CFormEditorApp::InitInstance() function, but it’s still loading native XP theme. I also try calling CExtUxTheme::EnableTheming( FALSE), which didn’t make any differen If it’s ever possible to use XP visual style instead of themes ? If XP visual style is used, I guess the menu is still based on menu bar, not win32 menu ? Thanks
|
|
Technical Support
|
May 17, 2008 - 12:33 PM
|
Would you clarify your question? What do you mean by “disable theming”? What the effect you want to achieve? Would you send us some screenshots?
|
|
Chris Anderson
|
May 19, 2008 - 10:22 AM
|
What we tried to do is : add an option to our app so it can either use the "themes" provided by prof-ui, or simply default to MFC/Win32 which can be controlled by a manifest file ( i.e. with native MFC app, you can enable Windows XP Visual Style or look and feel by adding a manifest file to the project, and calling InitCommonControls() during the start up ) You may ask why don’t we just use native XP theme provided by prof-uis, well, there is still difference between prof-ui native XP theme and native MFC app, I will create a screenshot shortly So in a nutshell, the question is : after the integration of prof-uis, is it possible to go back to the old MFC app without rolling back the changes in the code ? Thanks
|
|
Technical Support
|
May 19, 2008 - 1:22 PM
|
You asked a short question in a nutshell but we have no short answer for it. If you integrate Prof-UIS grids into your project, you will have to recode parts of your project after rolling back to MFC only UI because grids are not present in MFC. But we do not think you have any reason to remove the Prof-UIS grids. If you use Prof-UIS toolbars and menus without advanced features like embedded popup list boxes, undo/redo/color/date-picker menus, then you can switch back to MFC easily. Besides there is no problem with common controls and dialogs if you are not using any Prof-UIS methods of these controls. You can roll back to MFC by changing only class names if you are using Prof-UIS classes which are mostly re-painted versions of other well known controls. But we think Prof-UIS provides much more than simple re-painting and you should decide whether to use or not to use it.
|
|
Chris Anderson
|
May 19, 2008 - 2:04 PM
|
thank you for the information
|
|
Peter Meier
|
May 14, 2008 - 12:34 PM
|
Hi Supporters ! Are there any plans to integrate a masked grid cell into Prof-UIS in the near future ? If not, could you please give me a hint of how to subclass the inline edit control, since I would need control over the caret for developping such a cell... Thank you - Peter
|
|
Rado Manzela
|
May 13, 2008 - 10:30 AM
|
Typing second time after logging me out after posting first message :((( Ok I’ve found 2 problems in tree grid. Here is VS2005 project with compiled demo exe: http://rrrado.szm.sk/grid_bug.rar 1. Print preview draws second line shifted to left ("98" should be under "313") 2. HoverInfoGet().m_dwAreaFlags sometimes does not work in CChildView::OnContextMenu. Sometimes it returns __EGBWA_NOWHERE althought mouse pointer is above valid cell. You can get it when you select some unselected cell/row with left mouse button and then try to invoke context menu using right mouse button. Maybe you’ll have to do this 10 times to get my error message. Can you check it please? Thank you.
|
|
Technical Support
|
May 16, 2008 - 2:16 PM
|
We would like to discuss a couple of issues:
1) The VK_LEFT and VK_RIGHT keys are processed by the CExtTreeGridWnd control (in the CExtTreeGridWnd::OnGbwAnalyzeCellKeyEvent() method). It is possible to change the behavior of these keys so that when pressed they collapse/expand rows only, scroll only, collapse/expande by default and scroll with some modifier key (VK_SHIFT or VK_CONTROL ). We would like to know your point of view. We assume the current behavior provided by the CExtTreeGridWnd::OnGbwAnalyzeCellKeyEvent() virtual method is too simple and we can provide some new and customizable behavior instead.
2) We have re-tested the hit-testing results again and we never get nowhere code. May be we need to do some special sequence of steps to get it?
|
|
Rado Manzela
|
May 19, 2008 - 8:08 AM
|
1) it depends on tree size and structute. There is not a big usage difference in my tree so you could check standard windows tree behaviour for this 2) in my project resize 2nd column to prevent tooltip. - Left click at "313" to select row, right click at 313
- Left click at "98" to select row, right click at 98
- back to beginning until "NOWHERE!" message box (there is random # of repetiotions needed - from 2 to 10)
Maybe you was trying it with another prof-uis version ? (You could try my exe with 2.82 debug dll)
|
|
Technical Support
|
May 15, 2008 - 4:00 AM
|
The current version of CExtPPVW requires all the grid cells to have valid, non-NULL pointers. Although, any grid supports NULL pointers in any cell locations, typically the grid controls become completely initialized with grid cells. You initialize the tree grid using the following code at the end of the CChildView::PreSubclassWindow() method: CExtGridCellNumber *item;
item = (CExtGridCellNumber *)ItemGetCell(it,0,0,RUNTIME_CLASS(CExtGridCellNumber));
item->_VariantAssign(22);
item = (CExtGridCellNumber *)ItemGetCell(it,1,0,RUNTIME_CLASS(CExtGridCellNumber));
item->_VariantAssign(313);
it = ItemInsert( NULL, ULONG(-1), 1 );
item = (CExtGridCellNumber *)ItemGetCell(it,1,0,RUNTIME_CLASS(CExtGridCellNumber));
item->_VariantAssign(98); Please add one line of code ( _VariantAssign() even is not needed, we only need an existing cell object): item = (CExtGridCellNumber *)ItemGetCell(it,0,0,RUNTIME_CLASS(CExtGridCellNumber));
|
|
Rado Manzela
|
May 16, 2008 - 3:49 AM
|
Thank you, I’ll check this (will you fix it in next release?) What about 2nd bug?
|
|
tera t
|
May 13, 2008 - 2:14 AM
|
Hello. I may have still inquired it.
Is not the setting of print pages possible? Thanks,
|
|
tera t
|
May 14, 2008 - 9:04 PM
|
Hello. I can appoint print pages when I make it DoPrintDoc(true).
I want to use this function by all means.
Will there be any problem?
void CExtPPVW_HostWnd::OnPreviewPrint()
{
if( m_pPpvPrintable == NULL )
return;
GetParent()->ShowWindow( SW_HIDE ); // hide container window
HWND hWndOwn = GetSafeHwnd();
ASSERT( hWndOwn != NULL );
m_pPpvPrintable->DoPrintDoc( true );
|
|
Technical Support
|
May 16, 2008 - 1:52 PM
|
The CExtPPVW template class is derived from the CExtPPVW_Printable helper class which has the following two bool properties: m_bUsePrintDialogFromOutside and m_bUsePrintDialogFromPreview . Both of these properties are set by default to false . The m_bUsePrintDialogFromPreview property defines whether the standard print dialog should be displayed when the Print button is clicked in the inner toolbar of the print preview window. The m_bUsePrintDialogFromOutside property defines whether the standard print dialog should be displayed when the ID_FILE_PRINT command is handled by the CExtPPVW -based class from outside the print preview UI. You can set them to true to see the dialog you need.
|
|
tera t
|
May 18, 2008 - 6:32 PM
|
Hello. I carry it out with a mode for mbs-Debug.
Assert appears.
m_bUsePrintDialogFromPreview = true
-------------------------------------------
DLGPRNT.cpp int CPrintDialog::DoModal()
{
ASSERT_VALID(this);
ASSERT(m_pd.Flags & PD_ENABLEPRINTHOOK);
ASSERT(m_pd.Flags & PD_ENABLESETUPHOOK); ------------------------------------------- After I was troubled
I copied an ExtPrint.cpp source, and Assert did not appear.
The problem was settled.
|
|
Technical Support
|
May 14, 2008 - 6:27 AM
|
The CExtPPVW_Base class is just a container for some algorithms which are required in the CExtPPVW template class. It’s not possible to use the CExtPPVW template class with any abstract window for adding ready-to-use printing and previewing to it. Prof-UIS provides several specialized versions of the CExtPPVW template class and the specialized classes are ready-to-use print preview versions for particular Prof-UIS classes. The print previewing subsystem is supported for all Prof-UIS grid controls. The CExtPPVW template class can be used with MFC view windows based on the CView class or derived from it. This is possible because the API of CExtPPVW class is very similar or exactly the same as in CView . If you need print preview features for your custom class (window or control), you should derive it from a CExtPPVW -based type and implement at least the CExtPPVW_Printable::OnPreparePrinting() virtual method which completely initializes the cache of Windows metafiles (one metafile for each page) in a temporarily created folder. You may also need to implement other virtual methods so that you can determine whether the printing/previewing feature is available (the CExtPPVW_Printable::IsPrintPreviewAvailable() virtual method) or show printing progress (a set of CExtPPVW_Printable::OnPreparePrinting_***() virtual methods).
|
|
tera t
|
May 12, 2008 - 8:47 PM
|
Hello. When I am for release, non-display a theme bar
When I am for "Debug", I want to display a theme bar.
Is there the good method?
|
|
Technical Support
|
May 15, 2008 - 9:10 AM
|
You can use the _DEBUG compiler constant which is defined in the Debug configurations. Just put all the code relative to the theme bar creation or showing to the following code: #ifdef _DEBUG
// put some code here
#endif
|
|
Offer Har
|
May 12, 2008 - 4:52 PM
|
I think that I have part in this removal... I asked for this to be removed if the last column is to occupy the whole width of the grid. You removed it altogether even if the last column does not reach the end of the grid, and then it looks a little weird...
|
|
Technical Support
|
May 23, 2008 - 1:52 PM
|
|
|