Subject |
Author |
Date |
|
Richard Gardner
|
Feb 11, 2008 - 12:13 PM
|
Hi I have such a code int iRowCount = m_Grid.RowCountGet(); CExtGridCellString *pCellSymbol; CExtGridCellDateTime *pCellDateTime; for (i = 0; i < iRowCount; i++) { CExtGridCellString *pCell = STATIC_DOWNCAST(CExtGridCellString, m_Grid.GridCellGet(1, i)); pCell->TextGet(cellText); if (cellText == pu.Symbol) { pCellDateTime = STATIC_DOWNCAST(CExtGridCellDateTime, m_Grid.GridCellGet(0, i)); pCellDateTime->SetDateTime(pu.TradeDateTime);
//m_Grid.Invalidate() ; TRACE1("Time %s\n", pu.TradeDateTime.Format()); return ; } }
where in the loop I find the needed row, then update another’s cell value. But if I don’t call m_Grid.Invalidate() the value change is not reflected in the grid. If I resize the dialog then I can also see value changes. Is this is a correct behavior of the grid? Values are coming from another 3rd party COM object and I can see them using TRACE1.
The cell was created using such a code pCellDateTime = STATIC_DOWNCAST(CExtGridCellDateTime, m_Grid.GridCellGet(0, iRowCount, 0, 0, RUNTIME_CLASS(CExtGridCellDateTime))); pCellDateTime->SetMode(CExtGridCellDateTime::all); pCellDateTime->SetTimeFormat(CExtGridCellDateTime::automatic); pCellDateTime->SetDateTime(pu.TradeDateTime); pCellDateTime->ModifyStyle(__EGCS_READ_ONLY, 0); pCellDateTime->ModifyStyle(0, __EGCS_BUTTON_DROPDOWN); when doing such a code the values are displayed correctly.
Any idea are welcome Thx
|
|
Courtney Smith
|
Aug 11, 2008 - 6:26 PM
|
Hi, I have run into this problem too. I need to update my whole grid, but when i do MywndGrid.UpdateWindow(); It still won’t update. I hope there is an easier way to update my whole grid without getting the rect for each cell? Thanks, Courtney
|
|
Technical Support
|
Aug 12, 2008 - 1:45 PM
|
You should invalidate the grid control first and only then update it: CExtGridWnd & wndGrid = . . .
wndGrid.Invalidate();
wndGrid.UpdateWindow(); The code above repaints the entire grid window immediately. Please note, this is not effective if you need to repaint only one or several grid cells. Youshould invalidate only cell areas and finally invoke the wndGrid.UpdateWindow(); . To invalidate one cell area after modifying cell’s data you should use the following code: // you know row/column indices
LONG nColNo = . . .
LONG nRowNo =
// and you know where the cell is (the next both values are zeros for inner data cells)
INT nColType = . . .
INT nRowType = . . .
// now you can get rectangular area of this grid cell in the client coordinates of grid control
CRect rcInvalidate;
if( ! wndGrid.GridCellRectsGet( nColNo, nRowNo, nColType, nRowType, NULL, &rcInvalidate ) )
return ... // cell is outside of the visible cell range
// invalidate cell area
wndGrid.InvalidateRect( &rcInvalidate ); The code above should be invoked for all the modified cells. Then finally you can invoke the wndGrid.UpdateWindow(); to make all the invalidated grid cells repainted immediately.
|
|
Richard Gardner
|
Feb 12, 2008 - 11:33 AM
|
HI thx for the answer. accordingly to your answer when I call _VariantAssign or SetDateTime the cell itself won’t invalidate it’s content, and to see the new values I have 2 options 1. to find GridCellRect and invalidate that rectangle 2. call wndGrid.UpdateWindow(); these solutions are ok for me.
thx for help.
|
|
Technical Support
|
Feb 12, 2008 - 5:15 AM
|
The code snippets both in your project and in the COM object project contain API invocations for repainting the grid. Please let us discuss this in details. Drid cells do not know their locations in the grid window and they even do not know if they are displayed in some grid window or not. It is extremely inefficient to provide a grid cell with details about its location in the grid window because row/column insertion would need to provide a lot of cells with location changing notification. But your code should know which cell it’s accessing/modifying and only your code knows the exact location. You can get coordinates of any grid cell in the grid window using the CExtGridWnd::GridCellRectsGet() method. This method allows you to compute therectangle of theentire grid cell in client coordinates of the grid window and rectangles of any of built-in parts of the grid cell. Here is the example of how to repaint aninner data cell in the CExtGridWnd window: LONG nColNo = ...
LONG nRowNo = ...
CExtGridWnd & wndGrid = ...
CRect rcCellExtra;
if( ! wndGrid.GridCellRectsGet(
nColNo,
nRowNo,
0,
0,
NULL,
&rcCellExtra
)
)
return ... // grid cell is out of displayed cell range
wndGrid.InvalidateRect( &rcCellExtra ); Please note that CExtGridWnd::GridCellRectsGet() returns a flag which indicates if the cell and/or its parts locations are computed and returned successfully. This method does not allow you to compute the cell location if a cell is outside the visible/displayed range in the grid window. So, this method does not allow you to repaint the invisible grid cells. Your code should invalidate all the modified grid cells and you can use wndGrid.UpdateWindow(); to make all the changes visible immediately on the screen. For instance, the CExtGridCellInplaceSlider grid cell draws a slider or a scroll bar control in the cell’s area, this slider/scroll bar is a custom painted and non HWND-based part of the grid cell and you can drag its thumb button like it’s the slider/scroll bar common control on some dialog. This slider/scroll bar functionality is implemented in the CExtGridCellInplaceSlider class which invalidates the slider/scroll bar grid cell and updates the grid button during the position changing of the thumb button. The second code snippet (from COM object) in your e-mail does not explain why the grid cells and/or entire grid window become repainted. We guess the grid is invalidated in some other part of code.
|
|
Oliver Rau
|
Feb 8, 2008 - 6:30 AM
|
Dear ProfUIS-Team,
using cursor keys CExtComboBox does not repaint the list box correctly. Therefore we needed to modify the original source code in ExtComboBox.cpp to achieve the correct behaviour: void CExtComboBoxPopupListBox::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags )
{
ASSERT_VALID( this );
if( m_pCB->GetDroppedState() )
{
DWORD dwComboBoxType = m_pCB->GetStyle() & 0x0003L;
CListBox * pListBox = ( CListBox * ) this;
bool bSelChanged = false;
switch( nChar )
{
case VK_LEFT:
case VK_UP:
{
// Go up until we find a valid selection
// then set the current selection to that one
INT nCurSel = pListBox->GetCurSel();
INT nSel = nCurSel;
bool bInitSelection = false;
INT nCount = pListBox->GetCount();
if( nSel < 0 && nCount > 0 )
{
nSel = nCount - 1;
bInitSelection = true;
}
if( nSel != LB_ERR )
{
while( nSel > 0 )
{
INT nItem = nSel - ( bInitSelection ? 0 : 1 );
if( m_pCB->LbItemIsEnabled( nItem ) )
{
if( nCurSel != nItem )
{
// ---------- START MODIFIED SOURCE CODE (1/2) -----------
// pListBox->SetRedraw( FALSE ); // original position
INT nRealSel = pListBox->SetCurSel( nItem );
pListBox->SetRedraw( FALSE ); // new position
// ---------- END MODIFIED SOURCE CODE (1/2) -----------
if( nCurSel != nRealSel )
{
if( dwComboBoxType == CBS_DROPDOWNLIST )
{
INT nTopIndex = pListBox->GetTopIndex();
m_pCB->SetCurSel( nRealSel );
pListBox->SetTopIndex( nTopIndex );
}
else
{
CString sText;
pListBox->GetText( nRealSel, sText );
m_pCB->SetWindowText( sText );
m_pCB->SetEditSel( 0, -1 );
}
bSelChanged = true;
}
pListBox->SetRedraw( TRUE );
pListBox->RedrawWindow(
NULL,
NULL,
RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME
);
}
break;
}
nSel--;
}
}
}
break;
case VK_RIGHT:
case VK_DOWN:
{
// Go up until we find a valid selection
// then set the current selection to that one
INT nCurSel = pListBox->GetCurSel();
INT nSel = nCurSel;
bool bInitSelection = false;
INT nCount = pListBox->GetCount();
if( nSel < 0 && nCount > 0 )
{
nSel = 0;
bInitSelection = true;
}
if( nSel != LB_ERR )
{
while( nSel < nCount - 1 )
{
INT nItem = nSel + ( bInitSelection ? 0 : 1 );
if( nItem == nCount )
break;
if( m_pCB->LbItemIsEnabled( nItem ) )
{
if( nCurSel != nItem )
{
// ---------- MODIFIED SOURCE CODE (2/2) -----------
// pListBox->SetRedraw( FALSE ); // original position
INT nRealSel = pListBox->SetCurSel( nItem );
pListBox->SetRedraw( FALSE ); // new position
// ---------- END MODIFIED SOURCE CODE (2/2) -----------
if( nCurSel != nRealSel )
{
if( dwComboBoxType == CBS_DROPDOWNLIST )
{
INT nTopIndex = pListBox->GetTopIndex();
m_pCB->SetCurSel( nRealSel );
pListBox->SetTopIndex( nTopIndex );
}
else
{
CString sText;
pListBox->GetText( nRealSel, sText );
m_pCB->SetWindowText( sText );
m_pCB->SetEditSel( 0, -1 );
}
bSelChanged = true;
}
pListBox->SetRedraw( TRUE );
pListBox->RedrawWindow(
NULL,
NULL,
RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME
);
}
break;
}
nSel++;
}
}
}
break;
case VK_HOME:
case VK_PRIOR:
[...] It would be nice if we could put aside these customizations with the next ProfUIS release. Best regards, Martin
|
|
Technical Support
|
Feb 11, 2008 - 6:38 AM
|
We confirm this issue and already fixed it. Please request the updated source code via email. Additionally, we implemented a new CExtNCSB template class which can be used for skinning the non-client area based scroll bars of any window. This template class is now used by the list box inside the child combo box and popup list box of drop list/dropdown combo boxes.
|
|
Oliver Rau
|
Feb 8, 2008 - 4:55 AM
|
Dear ProfUIS-Team,
adding a new option page does not ensure resizing of the ribbon option dialog. The original ProfUIS code does not take care about the size of option pages. To create a ribbon’s option dialog the dialog template IDD_EXT_RIBBON_OPTIONS_DIALOG is taken from resources. If the size of a custom option page exceeds that of the dialog control IDC_EXT_RIBBON_STATIC_FRAME, then the problem is passed to the user.
Therefore we needed to customize ExtRibbonBar.cpp in order to deal with that problem: BOOL CExtRibbonOptionsDialog::OnInitDialog()
{
m_wndOptionsTabs.ResetContent();
if( m_pRibbonBar->GetSafeHwnd() == NULL
|| ( ! CExtNCW < CExtResizableDialog > :: OnInitDialog() )
)
{
ASSERT( FALSE );
return FALSE;
}
ASSERT_VALID( m_pRibbonBar );
m_strCommandProfileName =
g_CmdManager->ProfileNameFromWnd( m_pRibbonBar->m_hWnd );
ASSERT( ! m_strCommandProfileName.IsEmpty() );
g_CmdManager->ProfileWndAdd(
LPCTSTR( m_strCommandProfileName ),
m_hWnd
);
CWnd * pWnd = CExtControlBar::stat_GetWndForPlacement( m_pRibbonBar );
HICON hIcon = NULL;
if( pWnd->GetSafeHwnd() != NULL )
{
hIcon = (HICON)
::SendMessage(
pWnd->m_hWnd,
WM_GETICON,
ICON_BIG,
0L
);
if( hIcon == NULL )
{
hIcon = (HICON)
::SendMessage(
pWnd->m_hWnd,
WM_GETICON,
ICON_BIG,
0L
);
if( hIcon == NULL )
{
hIcon = (HICON)
::GetClassLong(
pWnd->m_hWnd,
__EXT_MFC_GCL_HICON
);
if(hIcon == NULL)
hIcon = ::AfxGetApp()->LoadStandardIcon( IDI_WINLOGO );
} // if( hIcon == NULL )
} // if( hIcon == NULL )
} // if( pWnd->GetSafeHwnd() != NULL )
if( hIcon != NULL )
{
SetIcon( hIcon, TRUE );
SetIcon( hIcon, FALSE );
} // if( hIcon != NULL )
AddAnchor( IDC_EXT_RIBBON_LIST_BOX_TABS, __RDA_LT, __RDA_LB );
AddAnchor( IDC_EXT_RIBBON_STATIC_FRAME, __RDA_LT, __RDA_RB );
AddAnchor( IDOK, __RDA_RB );
AddAnchor( IDCANCEL, __RDA_RB );
CRect rcWnd;
GetWindowRect( &rcWnd );
CSize _sizeMinTrack(
::MulDiv( rcWnd.Width(), 5, 6 ),
::MulDiv( rcWnd.Height(), 7, 8 )
);
SetMinTrackSize( _sizeMinTrack );
CRect rcPage;
m_labelEmptyFrame.GetWindowRect( &rcPage );
ScreenToClient( &rcPage );
m_pRibbonBar->OnRibbonOptionsDialogInitPageRTCs( *this );
HWND hWndSelPage = NULL;
HWND hWndInsertAfter = m_wndOptionsTabs.m_hWnd;
INT nPageIndex, nPageCount = INT( m_arrPageRTCs.GetSize() );
for( nPageIndex = 0; nPageIndex < nPageCount; nPageIndex ++ )
{
CRuntimeClass * pRTC = m_arrPageRTCs[ nPageIndex ];
if( pRTC == NULL
|| ( ! pRTC->IsDerivedFrom( RUNTIME_CLASS( CExtRibbonOptionsPage ) ) )
)
{
ASSERT( FALSE );
return FALSE;
}
CObject * pObject = pRTC->CreateObject();
if( pObject == NULL )
{
ASSERT( FALSE );
return FALSE;
}
CExtRibbonOptionsPage * pPage =
STATIC_DOWNCAST( CExtRibbonOptionsPage, pObject );
UINT nPageID = pPage->RibbonOptionsPage_GetID();
if( ! pPage->Create( nPageID, this ) )
{
ASSERT( FALSE );
return FALSE;
}
pPage->ShowWindow( SW_HIDE );
if( ! m_wndOptionsTabs.AddPage( pPage ) )
{
ASSERT( FALSE );
return FALSE;
}
if( hWndSelPage == NULL )
hWndSelPage = pPage->m_hWnd;
else if( m_nSelectedPageID == nPageID )
hWndSelPage = pPage->m_hWnd;
// ----------- START OF INSERTED CODE ------------
CRect pageRect;
CRect newRect(rcWnd);
pPage->GetWindowRect(&pageRect);
int difX = pageRect.Width() - rcPage.Width();
if (0 < difX )
{
newRect.right += difX;
rcPage.right += difX;
}
int difY = pageRect.Height()- rcPage.Height();
if (0 < difY )
{
newRect.bottom += difY;
rcPage.bottom += difY;
}
if ( !newRect.EqualRect(rcWnd))
{
MoveWindow(&newRect);
rcWnd = newRect;
}
// ----------- END OF INSERTED CODE ------------
::SetWindowPos(
pPage->m_hWnd,
hWndInsertAfter,
rcPage.left,
rcPage.top,
rcPage.Width(),
rcPage.Height(),
SWP_NOACTIVATE|SWP_NOOWNERZORDER
);
AddAnchor( pPage->m_hWnd, __RDA_LT, __RDA_RB );
hWndInsertAfter = pPage->m_hWnd;
} // for( nPageIndex = 0; nPageIndex < nPageCount; nPageIndex ++ )
pWnd = GetWindow( GW_CHILD );
for( ; pWnd != NULL; pWnd = pWnd->GetWindow( GW_HWNDNEXT ) )
{
CExtRibbonOptionsPage * pPage =
DYNAMIC_DOWNCAST( CExtRibbonOptionsPage, pWnd );
if( pPage == NULL )
continue;
if( ! pPage->RibbonOptionsPage_InitContent() )
{
ASSERT( FALSE );
return FALSE;
} // if( ! pPage->RibbonOptionsPage_InitContent() )
} // for( ; pWnd != NULL; pWnd = pWnd->GetWindow( GW_HWNDNEXT ) )
if( m_nSelectedPageID == __EXT_RIBBON_OPTIONS_DIALOG_PAGE_DEFAULT )
m_nSelectedPageID = __EXT_RIBBON_OPTIONS_DIALOG_PAGE_CQATB;
CExtRibbonOptionsPage * pSelectedPage = NULL;
pWnd = GetDlgItem( m_nSelectedPageID );
if( pWnd != NULL )
pSelectedPage = DYNAMIC_DOWNCAST( CExtRibbonOptionsPage, pWnd );
if( pSelectedPage == NULL )
{
pWnd = GetWindow( GW_CHILD );
for( ; pWnd != NULL; pWnd = pWnd->GetWindow( GW_HWNDNEXT ) )
{
pSelectedPage = DYNAMIC_DOWNCAST( CExtRibbonOptionsPage, pWnd );
if( pSelectedPage != NULL )
break;
} // for( ; pWnd != NULL; pWnd = pWnd->GetWindow( GW_HWNDNEXT ) )
} // if( pSelectedPage == NULL )
if( pSelectedPage != NULL )
m_wndOptionsTabs.SelectPage( pSelectedPage );
m_wndOptionsTabs.OnSwUpdateScrollBars();
if( hWndSelPage != NULL )
{
m_labelEmptyFrame.ShowWindow( SW_HIDE );
::ShowWindow( hWndSelPage, SW_SHOW );
}
return TRUE;
} Would you please provide for such kind of resize functionality in future releases? Best regards, Martin
|
|
Technical Support
|
Feb 9, 2008 - 1:47 AM
|
Thank you for sharing this interesting idea with us. We can add this improvement without any changes to Prof-UIS but it may potentially make the entire ribbon options dialog much wider and/or higher than the width and/or height of the desktop. We believe the better solution should be based on a scrollable dialog container which allows the user to scroll the dialog if there is not enough space for it and at the same time it should allow the use to implement control anchoring and automatic repositioning if there is enough space for this dialog. Here is the sample application demonstrating such ready-to-use scrollable dialog container:
TestScrollDialog.zip
The entire options dialog have some initial size which is not very big and not very small. Its size is some common dialog size which is close to the middle size of most of the dialogs in the most of applications. But the user can resize the options dialog if some page contains a larger number of controls and any other UI elements. This is behavior of the same dialog in MS Word. The CExtRibbonOptionsDialog class is kind of the CExtResizableDialog resizable dialog. It’s displayed modally in the virtual method. So, you can invoke resizable dialog’s EnableSaveRestore() method to make the position of the ribbon options dialog restorable.
|
|
Oliver Rau
|
Feb 8, 2008 - 3:37 AM
|
Dear ProfUIS-Team,
the main frame of our application is based on your RibbonBarMDI sample, using a scrollable editor for a child window.
When scrolling through the ribbon tab pages from left to right using the mouse wheel there appears a strange behaviour after having reached the last (rightmost) tab page: the wheel suddenly starts to scroll downward the loaded document. This happens while the mouse pointer has never left the focus of the ribbon bar.
If changing the direction of moving the wheel the tab pages immediately start to scroll backward from right to left. After having reached the first (leftmost) tab page the editor begins to scroll upward through the document.
It seems to me that the scroll events are left unhandled in the message queue while being invoked outside the tab page range, and therefore will be passed to the child window as long as the scroll direction doesn’t change.
Kind regards,
Martin
|
|
Technical Support
|
Feb 9, 2008 - 1:41 AM
|
The mouse wheel scrolling is typically implemented using the MFC’s message pre-translation. So, you can pre-translate the WM_MOUSEWHEEL message in your editor view and completely eat it if the mouse pointer is over the editor. If you don’t do this, the wheel behavior should work like in a scrollable HTML page in a web browser: if there is nothing more to scroll in the text input, then the browser scrolls the entire HTML page.
|
|
Richard Gardner
|
Feb 7, 2008 - 11:50 PM
|
Hi I have such an image http://designleon.com/temp/Open.bmp which has a color which shall be transparent. I’m trying to use it for a button in ToolControlBar, but I can’t make it appear without that transparent color. I tried this way CExtBitmap bmp; g_ResourceManager->LoadBitmap(bmp, IDB_BITMAP_OPEN); bmp.Make32(); //bmp.AdjustHLS(RGB(255, 0, 255), RGB(3, 3, 3)); g_CmdManager->CmdSetIcon(pApp->m_pszProfileName, ID_DMW_OPEN, bmp); but anyway I see that redish color What do I do wrong? What would be the best way to assign images with transparency to toolbar buttons?
Thx
P.S. Using VS 2005 and Prof UIS 282
|
|
Technical Support
|
Feb 11, 2008 - 6:09 AM
|
You should use the CExtBitmap::AlphaColor() method, which allows you to convert pixels of the specified color to transparent: CExtBitmap bmp;
g_ResourceManager->LoadBitmap(bmp, IDB_BITMAP_OPEN);
bmp.Make32();
// mark magenta color pixels as transparent
COLORREF clrTransparent = RGB(255,0,255); // magenta
bmp.AlphaColor( clrTransparent, RGB(0,0,0), BYTE(0) );
|
|
Offer Har
|
Feb 7, 2008 - 5:01 PM
|
Dear Support,
We need to display a jpeg in a grid cell.
Please advise
Thanks, Ron.
|
|
Offer Har
|
Feb 11, 2008 - 8:24 AM
|
Thanks for the information - we’ll try it out.
|
|
Technical Support
|
Feb 11, 2008 - 6:08 AM
|
In Prof-UIS there are a CExtBitmap class that represents an image and CExtCmdIcon that implements an icon. The latter contains a set of CExtBitmap objects that represent different states of an icon. The CExtBitmap class works with .BMP images only.
There is a CExtSkinBitmap classin the ProfSkin project. It is derived from CExtBitmap and allows you to work with .PNG images. Both .BMP and .PNG image formats are lossless and the difference is that PNG is well compresed and of a much lesser size. The .JPG, .GIF and many other formats are lossy and that is why we do not support support them. So, you can convert .JPG images to .BMP or .PNG before using them or, otherwise, you need some image processing library for loading .JPG images. There are FreeImage and CxImage libraries that can be used for this task. Both libraries are a collection of other libraries for loading/saving different image formats. They provide unified APIs for accessing image data and apply some effects. The ProfSkin library and these libraries are using LibPNG and ZLib libraries for loading/saving .PNG formats and not let you to see low level APIs of the LibPNG library. Both FreeImage and CxImage libraries are using LibJPG library for working with .JPG image format. You can also use LibJPG directly, but FreeImage and CxImage libraries can be integrated easier and faster.
http://freeimage.sourceforge.net/ http://www.codeproject.com/KB/graphics/cximage.aspx http://www.xdp.it/cximage.htm
|
|
Oliver Rau
|
Feb 7, 2008 - 11:12 AM
|
Dear ProfUIS-Team,
using the ribbon bar in MS Word 2007 shows a small but significant difference concerning the behaviour of the mnemonics invoked by pressing the ALT-key. The MS Word ribbon invokes the mnemonics while pressing the ALT-key, whereas ProfUIS ribbon invokes the mnemonics after releasing the ALT-key. I think the behaviour of MS Word is better because it enables a faster use of the keyboard. Would it be possible to integrate a behaviour - at least as an option - comparable to MS Word?
Kind regards,
Martin
|
|
Technical Support
|
Feb 18, 2008 - 4:24 AM
|
Thank you for your comment. Yes, MS Word allows you to perform some kind of faster key tip navigation. But we noticed it looks like although key tips can handle a key earlier than the key tip window appear on the screen, the user is not able to type key tip sequence too fast. Please let us test this feature additionally and come up with how it can be implemented in our ribbon bar.
|
|
Oliver Rau
|
Feb 15, 2008 - 9:50 AM
|
Besides the mentioned difference MS Word allows to directly input the Alt+<AnyKey> combination allowing a quick traversal for advanced users by keyboard only.
Kind regards,
Martin
|
|
Technical Support
|
Feb 9, 2008 - 1:34 AM
|
We noticed only one difference between two ribbon bars: MS Word displays key tips after a 1-2 second delay without waiting for when the ALT key is released. When the user presses ALT, this is assumed as a the classic accelerator key combination may be invoked. If the user only releases ALT after pressing, then the key tip based algorithm of ribbon navigation starts. This works equally in both ribbon bars. Could you provide the exact sequence of steps so we can see the difference?
|
|
Oliver Rau
|
Feb 7, 2008 - 10:52 AM
|
Dear ProfUIS-Team,
there are two issues with respect to the docking/floating behaviour using CExtControlBar , and both can be reproduced with the delivered sample apps (e.g. SDI_DynamicBars, ProfStudio):
1. Suppose having the (WinXP SP2) task bar vertically on the left side of the screen. If loaded out of the box, i.e. without any serialization traces in the registry, double clicking onto the caption bar of a docked window moves it (undocked now) to the screen coordinates (0,0). Unfortunately this behaviour seems to ignore the width of the task bar, i.e. the window is partly covered/hidden by the task bar.
2. Under MS Word 2007 docked windows are showing the following behaviour: Double clicking the caption bar of a docked window undocks it (same as in ProfUIS). Double clicking the caption bar of the undocked window moves it back to the previous docking place (not realized in ProfUIS). It would be nice to have the same behaviour with ProfUIS, too.
Kind regards,
Martin
|
|
Technical Support
|
Feb 18, 2008 - 4:22 AM
|
We have not implemented the double click based toggling of the floating state for resizable control bars because this feature has a conflict in design and even in Visual Studio .NET/2005/2008 it’s not working correctly in 100% of cases. It’s not possible to restore the exact floating state of the control bar inside a complex floating palette if its inner structure was changed since last state toggling.
|
|
Oliver Rau
|
Feb 15, 2008 - 10:33 AM
|
Sorry, under 2. I did not mean MS Word 2007 but MS Visual Studio 2005.
The behaviour here is like follows:
STATE: docked at defined position ACTION: double click bar RESULT: undocked state ACTION: double click bar RESULT: docked state at previous docking position
It would be nice to have the same behaviour with ProfUIS.
Regards,
Martin
|
|
Technical Support
|
Feb 9, 2008 - 1:37 AM
|
You can specify some initial floating positions using the CExtControlBar::SetInitDesiredPosFloating() method. But this does not guarantee the bars will not be located under shell bars like the task bar because shell bars can be re-docked or resized any time. You can also override the CExtControlBar::ToggleDocking() virtual method and make its body empty to disable double click based switching into the floating state. Please also note, the Prof-UIS’s state persistence code for control bars does validate location for floating control bars during loading the state. So, all the control bars will be moved to the nearest desktop areas on their nearest monitors if their floating locations saved into the state data is outside the current desktop.
|
|
Ian McIntosh
|
Feb 7, 2008 - 10:07 AM
|
In answer to another query, Tech Support posted suggesting use of "on-the fly initialization of tree rows during expanding". Do you have an example of how this should be done.
|
|
Technical Support
|
Feb 8, 2008 - 3:14 AM
|
Unfortunately we don’t have such a sample. The idea is simple. Insert only one child row into dynamically expandable rows and override the CExtTreeGridWnd::ItemExpand() virtual method which should determine if a tree row has never beenexpanded and initialize it before invoking the parent class method.
|
|
Oliver Rau
|
Feb 7, 2008 - 7:42 AM
|
After having tried the General Forum for some time without success I’m now trying to solve my problem using the Tech Support site with the same subject from 2008/01/17.
It’s important to notice that under v2.80 the whole thing worked without problems.
Kind regards,
Martin
|
|
Technical Support
|
Feb 9, 2008 - 1:31 AM
|
Please drop us an e-mail so we can provide with the latest source code (v.2.83 we are working on). We failed to reproduce the reported problems with it.
|
|
Phillip Bernard
|
Feb 7, 2008 - 7:23 AM
|
I tested DRAWCLI sample.
I have following monitor settings: [ 2 ] [ 1 ] 1 - primary monitor, screen coordinates: 0,0 x 1280,1024 2 - screen coordinates: -1280,0 x 0,1024
When i restore DRAWCLI main window from minimized state (click app button on task bar) it always appears on left (2) monitor though initially it was on right primary (1) monitor.
I looked at code and saw that in CExtNcFrameImpl::NcFrameImpl_SetWindowPlacement() to determine in which monitor you should mazimize window you use following method:
void CExtPaintManager::stat_GetMonitorParms( monitor_parms_t & _mp, HWND hWndFrom ) { ASSERT( hWndFrom != NULL && ::IsWindow(hWndFrom) ); RECT rcWnd = { 0, 0, 0, 0 }; VERIFY( ::GetWindowRect( hWndFrom, &rcWnd ) ); stat_GetMonitorParms( _mp, rcWnd ); }
But GetWindowRect() for minimized windows always returns rect with -32000 coords. {top=-32000 bottom=-31969 left=-32000 right=-31840} I don’t know why it work in this way. Then you call MonitorFromRect() which "..retrieves a handle to the display monitor that has the largest area of intersection with a specified rectangle.." (from msdn)
So for my case it will always return left (2) monitor.
|
|
Technical Support
|
Mar 14, 2008 - 9:57 AM
|
The desktop manager works well with default looking and behaving windows. It does not work correctly with skinned windows. The problem is not with the re-painted non-client area. The problem has to do with the re-computed non-client area when the WS_CAPTION style is removed. The skinning subsystem in Prof-UIS completely re-computes the non-client area for best skinning look and re-paints it. It also removes the WS_CAPTION style from the window because non-client areas of windows marked with this style become painted by Windows not through window procedure. In some situations Windows paints non-client areas of desktop windows manually without notifying them and this is absolutely not acceptable for skinning. Unfortunately there are no notifications for desktop window re-positioning commands invoked from the task bar. This problem is still at the research stage.
|
|
Thomas Hsieh
|
Mar 9, 2008 - 6:43 AM
|
Dear Technical Support, I encountered the same problem that our customer complained about this bug.
To reproduce this problem,
1. Use Office 2007 theme, maximize the application window size. 2. switch to desktop using "Show Desktop" command in Quick launch, then click the application back to front on the task bar. 3. The application window size will be restored as normal window size but not maximized.
Could you help us to fix this problem in Prof-UIS (include how to update the source code) for our customer?
Best Regards, Thomas
|
|
Phillip Bernard
|
Feb 12, 2008 - 6:29 AM
|
I discovered that thi issues is reproduced only with Office 2007 Theme (any of three). Please try again with this theme. I could stably reporduce this issue on three computers.
Also i found another related bug but more serious. It doesn’t depend on monitor’s count and is also reproduced only with Office 2007 Theme. Maximize main window (e.g. DRAWCLI sample). Click "Show Desktop" on Quick Launch. Click on DRAWCLI window button on tsak bar - main window restored with NOT maximazed state.
|
|
Technical Support
|
Feb 9, 2008 - 1:29 AM
|
We failed to reproduce this problem. All the sample applications work correctly in the same double monitor configuration. We checked this on Windows Vista Enterprise and Windows XP Professional with Service Pack 2, both systems are 32-bit. We believe the behavior may be hardware specific.
|
|
Phillip Bernard
|
Feb 7, 2008 - 6:49 AM
|
In customize mode when you simply try to select any menu item or toolbar button accidental D&D operation can be performed. It may looks as you just click on menu item and then it disapears.
This happens because you call pSite->DoDragCmdNode() in CExtToolControlBar::OnLButtonDown() and CExtPopupMenuWnd::OnLButtonDown() without checking if D&D operation is realy required.
But for this purpose exists winAPI function DragDetect(). It check if D&D begins by drag rectangle and drag time (the last is undocumented).
Because in Office 2003 D&D is checked only by drag rectangle i suggest following variant of DragDetect
bool MyDragDetect(CWnd *pWnd, CPoint point) { pWnd->ClientToScreen(&point); while (::DragDetect(pWnd->GetSafeHwnd(), point)) { CPoint pt; ::GetCursorPos(&pt); if (pt == point) continue; //only drag time elapsed but mouse is not moved return true; } return false; }
e.g. using this func in ExtPopupMenuWnd.cpp fragment of CExtPopupMenuWnd::OnLButtonDown() .... WND hWndOwn = m_hWnd; _ItemFocusSet( nIndex, TRUE, TRUE, FALSE ); if( ! ::IsWindow( hWndOwn ) ) return; ASSERT( hWndOwn != NULL && ::IsWindow(hWndOwn) );
if (!MyDragDetect(this, point)) { m_pDragSrcNode = NULL; m_bHelperNoHideChild = false; m_nDragSrcIdx = -1; m_bHelperNoRemoveSrc = false; m_bHelperDragOverPassed = false; return; }
pSite->DoDragCmdNode( this, NULL, m_pDragSrcNode, rcItem ); ....
|
|
Technical Support
|
Feb 9, 2008 - 1:28 AM
|
We completely agree with you so we added the following static method to the CExtControlBar class and invoked it from CExtPopupMenuWnd::OnLButtonDown() exactly as you advise: bool CExtControlBar::stat_DoDragDetect(
HWND hWnd,
const POINT & ptWndClient
)
{
if( hWnd == NULL || (! ::IsWindow( hWnd ) ) )
return false;
CPoint ptScreen = ptWndClient;
::ClientToScreen( hWnd, &ptScreen );
while( ::DragDetect( hWnd, ptScreen ) )
{
POINT ptCursorPos;
if( ! ::GetCursorPos( ptScreen) )
return false;
if( ptScreen == ptCursorPos )
continue; //only drag time elapsed but mouse is not moved
return true;
}
return false;
} We have also invoked it from the CExtToolControlBar::OnLButtonDown() method: m_pDragSourceTBB = pTBB;
m_pDragTargetTBB = NULL;
m_nDragTargetShift = 0;
m_bHelperSeparatorAction = false;
_InvalidateButton( nBtnDragSrc );
//UpdateWindow();
if( CExtControlBar::stat_DoDragDetect( m_hWnd, point ) )
pSite->DoDragCmdNode( this, pNodeI, pNodeC, rcItem );
m_pDragSourceTBB = NULL;
m_pDragTargetTBB = NULL;
m_nDragTargetShift = 0;
m_bHelperSeparatorAction = false;
return;
|
|
Pierre MEDART
|
Feb 7, 2008 - 2:53 AM
|
Hi,
In the OnCreate of our MainFrame we set the g_PaintManager->m_FontNormal to Segoe or Tahoma or Arial (depending on what font is on the system). The menu’s are using the correct font
On the release test builds, our QA team is facing one issue. They lock the station, then unlock it. The font menu is set to Arial (even if it was on Segoe before)
Do you try to synchronize the menu font ? What could be done to keep the font as we want ?
|
|
Technical Support
|
Feb 12, 2008 - 6:23 AM
|
It seems you need to add handlers for such system events as WM_SETTINGCHANGE and WM_DISPLAYCHANGE (maybe <code>WM_THEMECHANGED and WM_SYSCOLORCHANGE ) and reset the menu font in these handlers.
|
|
tera t
|
Feb 6, 2008 - 5:36 PM
|
Hello.
Are you busy with any other development? Development of me stops when I do not get an answer. ...........
|
|
Technical Support
|
Feb 9, 2008 - 1:06 AM
|
We are really sorry for this delay. We have just replied to all your posts.
|
|
Offer Har
|
Feb 6, 2008 - 5:00 AM
|
Dear Support,
I define a cell of type CExtGridCellColor which always contains a valid color like this:
pColorCell->SetMode(CExtGridCellColor::eNone);
pColorCell->SetColor(data.nColor);
pColorCell->ModifyStyle(__EGCS_NO_INPLACE_CONTROL); I then do this: 1. Open the drop down to show the colors list 2. hover the mouse over the Custom Color button 3. Press the Enter key The outcome is that the colors list is closed, and in the cell I get an undefined color (with a question mark). This situation is wrong, because I should always have a valid color. When hovering and pressing enter over a color button and pressing the enter that color is selected and the color list is closed - I suggest that when hovering and pressing enter over the Custom Color button you will not close the list. Please verify the problem and let me know of a possible solution. Regards, Ron.
|
|
Offer Har
|
Feb 12, 2008 - 3:30 PM
|
Thanks, Problem solved...
Now I just need to get some answers from you on all other issues that I’m waiting for answers for months (sent you mails today - please respond)
|
|
Technical Support
|
Feb 12, 2008 - 12:17 PM
|
We successfully reproduced the problem and fixed it. Thank you. Now when you press Enter over the Customize Color button, the color selection dialog opens.
Please update the following method: bool CExtPopupColorMenuWnd::_OnKeyDown(
UINT nChar,
UINT nRepCnt,
UINT nFlags,
bool & bNoEat
)
{
ASSERT_VALID( this );
nRepCnt;
nFlags;
bNoEat;
if( GetSafeHwnd() == NULL )
return true; //false;
if( GetSite().GetAnimated() != NULL )
return true;
TranslateKeyboardEventData_t _td( this, nChar, nRepCnt, nFlags, bNoEat );
if( _td.Notify() )
{
bNoEat = _td.m_bNoEat;
return true;
}
bool bEat = false;
switch( nChar )
{
case VK_RETURN:
{
HWND hWndThis = GetSafeHwnd();
if( ( m_nColorIdxCurr >= 0
|| m_nColorIdxCurr == IDX_DEFAULT_COLOR_BTN
|| m_nColorIdxCurr == IDX_CUSTOM_COLOR_BTN
)
&& ( ! _FindCustomizeMode() )
)
{
_NotifyColorChanged( true );
g_SoundPlayer->PlaySound( CExtSoundPlayer::__ON_MENU_CMD_CLICKED );
}
if( !::IsWindow(hWndThis) )
return true;
COLORREF clr = (COLORREF)__ECST_NONE;
switch( m_nColorIdxCurr )
{
case IDX_DEFAULT_COLOR_BTN:
clr = (COLORREF)__ECST_BUTTON_DEFAULT;
break;
case IDX_CUSTOM_COLOR_BTN:
clr = (COLORREF)__ECST_BUTTON_CUSTOM;
break;
default:
clr = _GetColorValue( m_nColorIdxCurr );
break;
}
_EndSequence( clr );
return true;
} // VK_RETURN
case VK_MENU:
_EndSequence();
return true;
case VK_ESCAPE:
if( m_bTopLevel )
_EndSequence();
else
{
int nParentCurIndex =
m_pWndParentMenu->_GetCurIndex();
ASSERT(
nParentCurIndex >= 0
&&
nParentCurIndex <=
m_pWndParentMenu->ItemGetCount()
);
HWND hWndOwn = m_hWnd;
m_pWndParentMenu->_SetCapture();
m_pWndParentMenu->_ItemFocusCancel(
FALSE
);
m_pWndParentMenu->_ItemFocusSet(
nParentCurIndex,
FALSE,
TRUE
);
if( ! ::IsWindow( hWndOwn ) )
return true;
m_pWndParentMenu->_SetCapture();
}
return true;
case VK_LEFT:
case VK_RIGHT:
case VK_UP:
case VK_DOWN:
case VK_TAB:
{
if( nChar == VK_TAB )
{
bool bAlt =
( (::GetAsyncKeyState(VK_MENU)&0x8000) != 0 )
? true : false;
bool bCtrl =
( (::GetAsyncKeyState(VK_CONTROL)&0x8000) != 0 )
? true : false;
if( bCtrl || bAlt )
break;
bool bShift =
( (::GetAsyncKeyState(VK_SHIFT)&0x8000) != 0 )
? true : false;
nChar = bShift ? VK_LEFT : VK_RIGHT;
}
int nOldIdx = m_nColorIdxCurr;
m_nColorIdxCurr = _GetNextKeyColor( nOldIdx, nChar );
bEat = ( m_nColorIdxCurr != nOldIdx ) ? true : false;
}
break;
} // switch( nChar )
if( bEat )
{
HWND hWndOwn = m_hWnd;
_CoolTipHide();
if( ! ::IsWindow( hWndOwn ) )
return true;
_NotifyColorChanged();
Invalidate();
}
return bEat;
}
|
|
Offer Har
|
Feb 12, 2008 - 10:19 AM
|
Dear Support,
I have tested it in 2.83 and the bug is still there.
Let me explain you what I am doing - maybe I was not clear enough last time: 1. Open the ’SimpleGrids’ application. 2. Go to ’Colors’ Tab. 3. Go to the first row, to the Text cell (or any other color cell for that matter). 4. Press the drop-down button - the list drop-down is opened. 5. move the mouse cursor over the ’Customize Color...’ button (Do Not click, just move the cursor over it) the button is highlighted. 6. Without moving the mouse, press the ’Enter’ key in the keyboard.
The result after step 6 is that the drop-down is closed, and there is no color selection in the cell - you get the ’?’ as the color, and no text. This is wrong because the user did not select anything.
I can clearly categorize this as a bug, and it’s very easy to reproduce also in the ProfUIS_Controls sample.
Please verify that you were able to reproduce this bug.
Regards, Ron.
|
|
Technical Support
|
Feb 8, 2008 - 3:18 AM
|
You can download the latest source code from our ftp server. Please contact us for ftp login details via email.
|
|
Offer Har
|
Feb 7, 2008 - 8:49 AM
|
The problem is that the None appears when it shouldn’t: Assign a color to the cell, remove the in-place, and repeat steps 1-3. If you can reproduce it, please send me the changes you did, I need to release a version ASAP
|
|
Technical Support
|
Feb 7, 2008 - 8:39 AM
|
We put the following code into the constructor of the CDemoColorPickerCell class in the SimpleGrids sample: SetMode( eNone );
ModifyStyle( __EGCS_NO_INPLACE_CONTROL ); These color grid cells are used in the grid window on the Colors tab page and we do not see anything wrong. But, frankly speaking, we made a couple of changes to thepop-up color picker menu a few days ago.
|
|
Nicholas Vezirgiannis
|
Feb 6, 2008 - 3:59 AM
|
Hallo again,
Sorry to bother you again, but it appears that there is a problem with the CComboBox Object. I have a CDialog and in it a CComboBox with several items in its list. When the program runs and attempt to change the selection in the combo that list appears to have 0 height. Basically instead of the list I get a line under it and no possibility to select any of the items. When I included a CComboBox in a simple MFC test project without prof-uis it worked just fine. I attempted to include the CExtComboBox instead, but the result was the same. Thanks in advance.
|
|
Technical Support
|
Feb 11, 2008 - 6:43 AM
|
We guess you may have simply specified an incorrect window rectangle of the combo box item dropped on the dialog resource. Please open the dialog editor and select the combo box. Now it’s a selected control in design mode. Then click on its drop down button. Now the designed combo box is in the special design mode which allows you to specify the desired maximal height of its popup list box.
|
|
Courtney Smith
|
Feb 5, 2008 - 9:36 AM
|
Do you have anykind of sample that is like a movie maker time line? Basically the functionality is you have several rows and you can drag and drop an object on the row and manipulate the object to cover some duration. Just a question. Thanks, Courtney
|
|
Technical Support
|
Feb 9, 2008 - 11:39 AM
|
The grid control is good because it already has many ready-to-use grid cell classes. But real time-line or history board can be long and should be scale-able. We have coded an interesting scrollable control a few years ago:
TestGraph2.zip
It displays dots and lines looking like chart but this is not the main feature. It uses float or double values instead of int or long values for specifying scrolling ranges and positions. You can see slider controls near each scroll bar and they allow you to scale scrollable ranges or magnify viewed data. We believe this is what really should be present in timeline. Our CExtFloatScrollWnd class uses OpenGL like normalized floating point values in range 0.0 ... 1.0. It’s possible to re-format text labels on each axis, remove chart lines, disable point drag-n-dropping and add everything else what make this window looking like timeline. Of course, we can help you to do this but it looks like we need more details about this task. What will be represented in X and Y axes? We need some more detailed data type descriptions, their ranges etc.
|
|
Technical Support
|
Feb 6, 2008 - 1:36 AM
|
If the time line is not unlimited, then it can be reproduced using a grid window with or without custom painted cells or grid areas. But generally this task is very specific to a particular project and requires a very detailed discussion on the time line control’s behavior and data shown on it. Unfortunately we have no stand alone time line control.
|
|
Courtney Smith
|
Feb 7, 2008 - 1:44 PM
|
Yea i figured it would be very customizable. Do you have something like a story board? I know I can use a grid cell. I was looking for something that had a linear direction basically so they couldn’t drag and drop to any cell but left to right or only top to bottom?
|
|
Ian McIntosh
|
Feb 4, 2008 - 5:51 AM
|
I have just updated from v2.81 to 2.82.
On startup of my app, the ribbonbar icons used to (correctly) display as small icons. After updating, they initially have large icons drawn that don’t fit.
As soon as I resize the app or maximise then restore, it sorts itself out.
A bit more info: When my app starts, it is not full screen. If full screen, the icons would fit being drawn large. In restore size, there is not enough space for all icons to be large, so the rightmost group of icons should automatically be drawn as small.
|
|
Technical Support
|
Feb 14, 2008 - 11:49 AM
|
We have just sent you an email with a link to the latest source code. The reported problem is fixed. If it is not the case, please let us know. Thank you.
|
|
Nigel Thomas
|
Mar 26, 2008 - 5:06 AM
|
Hi, We’re having the same issues - the app needs to be resized in order for the ribbon layout to display correctly. Could you please advise of this fix? Thanks.
|
|
Technical Support
|
Feb 13, 2008 - 10:09 AM
|
Although we did not receive any zip files including those renamed to ._z_, it seems we know what the problem is and are now debugging it. We will try to fix it as soon as possible and provide you with the update. Thank you for the doc file.
|
|
Ian McIntosh
|
Feb 13, 2008 - 2:10 AM
|
Please can you give me an update on progress.
|
|
Ian McIntosh
|
Feb 10, 2008 - 4:24 AM
|
I have sent 3 emails - 1 with the doc attachment, 1 with the zip (renamed ._z_) and one without any attachments. If you get 1 or 2 but not all 3, let me know & I will try again.
|
|
Technical Support
|
Feb 9, 2008 - 1:12 AM
|
We still didn’t receive any email from you. Please change the extension of the attached ZIP file to something like _Z_ and send it again. If you protect it with a password, that may also help it not to be filtered out somewhere.
|
|
Ian McIntosh
|
Feb 6, 2008 - 4:13 AM
|
Hi,
I have just sent you an email.
I have attached a doc showing how my icons are (incorrectly) looking on startup & how they should look. I also attach a zip of a project replicating the issue. It is based on the RibbonMdi sample app.
thanks
|
|
Technical Support
|
Feb 5, 2008 - 11:51 AM
|
Could you create a stripped version of your project with the UI code only and send it to us?
|
|
Ian McIntosh
|
Feb 5, 2008 - 1:55 AM
|
I have updated my CMainFrame::ActivateFrame() method to be the same as the RibbonBarMdi sample, but the problem is still there.
|
|
Technical Support
|
Feb 4, 2008 - 12:26 PM
|
Please compare the CMainFrame::ActivateFrame() virtual method in the RibbonBar sample application with the same method in yours. Your method should be similar.
|
|
Richard Chaney
|
Feb 3, 2008 - 1:29 PM
|
When using CExtPopupMenuWnd the delayed hiding of sub-menus does not work when moving the mouse onto a disabled menu item. For example if the File menu was :
File -> Open File Open Recent File -> Sub-Menu of recent files Close File (disabled)
The recent files sub-menu delayed hiding works if the mouse moves onto the "Open File" item, but if moving onto the disabled "Close File" item, it will hide immediately. The same is true if moving onto a separator.
|
|
Technical Support
|
Feb 9, 2008 - 1:08 AM
|
We tried to reproduce the problem using the Object menu in the DRAWCLI sample but failed. If you run it without painting any shapes in a new document created by default, the Object menu displayed from the menu bar contains enabled/disabled items used in our testing.
|
|
Phillip Bernard
|
Feb 1, 2008 - 6:03 AM
|
When I create CExtTreeGridWnd with 10.000 items it’s start work very-very slow. (For example Stringray’s trees with 100 and 100.000 items have no performance differences) What can I do to speedup it ?
|
|
Technical Support
|
Feb 2, 2008 - 11:32 AM
|
The CExtTreeGridWnd class is optimized for higher performance of grid cell retrieving, sorting and filtering queries. We confirm it’s slow for a very large number of rows. We knew this issue since the start of developing this class and this was not a barrier for developing it. If you have 10,000 rows in tree grid totally, then you should use on-the fly initialization of tree rows during expanding. If you have 10,000 rows at one tree level, then user will hardly see difference between rows while navigating them and you have reason to switch to some other UI solution based on several grids where some of them cache-able like demonstrated in the AdoRecordsetView sample application.
|